Integer - bit representation (computer)

About

Example

The integer number 42 in bit representation and the number of integer element that it can contains (min and max)

representation bit min max
two’s complement 8-bit 0010 1010
two’s complement 32-bit 0000 0000 0000 0000 0000 0000 0010 1010
packed binary-coded decimal (BCD) 0100 0010
32-bit IEEE-754 floating-point 0100 0010 0010 1000 0000 0000 0000 0000 <math>-2^{31}</math>
-2,147,483,648
<math>+2^{31}-1</math>
-2,147,483,647
64-bit IEEE-754 floating-point 0100 0000 0100 0101 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 <math>-2^{63}</math>
-9,223,372,036,854,775,807
<math>+2^{63-1}</math>
‭4.611.686.018.427.387.904‬

Documentation / Reference


Powered by ComboStrap