Integer Data Type in C | C Programming

Publicado el: 28 febrero 2020
en el canal de: MathsInDepth (Decoding Science)
12,617
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


En esta página del sitio puede ver el video en línea Integer Data Type in C | C Programming de Duración hora minuto segunda en buena calidad , que subió el usuario MathsInDepth (Decoding Science) 28 febrero 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 12,617 veces y le gustó like a los espectadores. Disfruta viendo!