There are four standard integer types
short
int
long
long long
The precise range of values re-presentable by a signed integer type depends not only on the number of bits used in the representation but also on the encoding techniques.
The most common binary encoding techniques for integers is called 2's compliment notation in which a signed integer represented with n bits will have a range from
(-2^n-1) through (2^n-1 - 1) encoded in the following fashion:
1. The left-most bit is the sign bit. If the sign bit is 1, the number is negative; otherwise the number is positive.
2. To negate an integer, complement all bits in the word and then add 1 to the result
3. The maximum negative value (-2^n-1), has no positive equivalent: negating this value produces the same value
Other binary integer encoding techniques are 1's complement notation, in which negation simply complements all bits of the word and sign magnitude notation, in which negation involves simply complementing the sign bit.
In C89, information about the representation of integer types is provided in the header file limits.h
In C99, the files stdint.h and inttypes.h contain additional information.
Follow our C programming Playlist:
• C Programming
Like and Share our videos
Subscribe to our channel for more fascinating videos
Greetings,
MathsInDepth Team.
Welcome to our channel MathsIndepth.
About the channel :
We publish videos on concepts of C Programming like never before.
Along with this, we also publish videos on Applied Mathematics.
For more details about the channel, visit our website: https://mathsindepth.in/
Support us on:
Facebook: / mathsindepth. .
LinkedIn: / math. .
Instagram: / mathsindepth
#CProgramming #SPA #mathsindepth
Sur cette page du site, vous pouvez voir la vidéo en ligne Integer Data Type in C | C Programming durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur MathsInDepth (Decoding Science) 28 février 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 12,617 fois et il a aimé like téléspectateurs. Bon visionnage!