Integer Data Type in C | C Programming

Veröffentlicht am: 28 Februar 2020
auf dem Kanal: MathsInDepth (Decoding Science)
12,552
like

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


Auf dieser Seite können Sie das Online-Video Integer Data Type in C | C Programming mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer MathsInDepth (Decoding Science) 28 Februar 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 12,552 Mal angesehen und es wurde von like den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!