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
Nesta página do site você pode assistir ao vídeo on-line Integer Data Type in C | C Programming duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário MathsInDepth (Decoding Science) 28 Fevereiro 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 12,617 vezes e gostou like espectadores. Boa visualização!