Skip to content

Number Converter#

This is a converter for showing numbers in different number systems.

Type in number:
C/Ada Notation: 0x.. / 16#.. (hex), 0b.. / 2#.. (bin)

Result
Decimal 255
Hexadecimal 0xFF
Octal 0377
Binary 0b11111111

Memory Inspection#

Number stored as unsigned 32bit Integer at address 0x1000:

Endian 0x1000 0x1001 0x1002 0x1003
Little (bin) 11111111 00000000 00000000 00000000
Little (hex) FF 00 00 00
Big (bin) 00000000 00000000 00000000 11111111
Big (hex) 00 00 00 FF

Data Types#

int, short, and word depend on the architecture.

Type Limit Min Limit Max
U8, Char 0 .. \(255 = 2^8 - 1\)
U16 0 .. \(65535 = 2^{16} -1\)
U32 0 .. \(4\,294\,967\,295\)
U64 0 .. \(18\;446\;744\;073\;709\;551\;615\)
U\(x\) 0 .. \(2^x - 1\)
I8 -128 .. 127
I16 −32768 .. 32767
I32 -2 147 483 648 .. 2.147.483.647
I\(x\) \(-2^{(x-1)}\) .. \(2^{(x-1)} - 1\)

Useful approximations: \(2^{10} \approx 1k\) \(2^{20} \approx 1M\) \(2^{30} \approx 1G\)

2-Complement#