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
In questa pagina del sito puoi guardare il video online Integer Data Type in C | C Programming della durata di ore minuti seconda in buona qualità , che l'utente ha caricato MathsInDepth (Decoding Science) 28 febbraio 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 12,617 volte e gli è piaciuto like spettatori. Buona visione!