VL
Initializing Lab Environment...

Binary, Decimal, Octal & Hexadecimal

Binary, Decimal, Octal & Hexadecimal Sandbox
Click Any Bit Switch (8-Bit Register ยท Unsigned 165 / Signed -91)
Nibble 11010Hex: A (10)
Nibble 00101Hex: 5 (5)
Decimal (Base 10)165 (Signed: -91)
Hex (Base 16)0xA5
Octal (Base 8)0o245
ASCII (if 32โ€“126)N/A

Bit Length & Direct Conversion

Parameters

0255

Binary, Decimal, Octal & Hexadecimal

BIN/HEX

Computers store data in fixed bit widths (4-bit Nibbles, 8-bit Bytes, 16-bit Words, 32-bit DWords). Switch bit lengths, edit any base (Binary, Octal, Decimal, Hex), and see Signed Two's Complement vs Unsigned values.

Base 2โ€…โ€Šโ†”โ€…โ€ŠBase 8โ€…โ€Šโ†”โ€…โ€ŠBase 10โ€…โ€Šโ†”โ€…โ€ŠBase 16\text{Base } 2 \;\leftrightarrow\; \text{Base } 8 \;\leftrightarrow\; \text{Base } 10 \;\leftrightarrow\; \text{Base } 16

Whiteboard Solver Steps

Step 1

1. Decimal โ†’ Binary (Repeated Division by 2)

Remainders (bottom-to-top): 165 รท 2 = 82 R 1 โ†’ 82 รท 2 = 41 R 0 โ†’ 41 รท 2 = 20 R 1 โ†’ 20 รท 2 = 10 R 0 โ†’ 10 รท 2 = 5 R 0 โ†’ 5 รท 2 = 2 R 1 โ†’ 2 รท 2 = 1 R 0 โ†’ 1 รท 2 = 0 R 1.

16510โ†’รท2101001012165_{10} \xrightarrow{\div 2} 10100101_2
Step 2

2. Decimal โ†’ Octal (รท 8) & Hexadecimal (รท 16)

Hex division steps: 165 รท 16 = 10 R 5 โ†’ 10 รท 16 = 0 R A.

16510=2458=0xA516165_{10} = 245_8 = \text{0x}A5_{16}
Step 3

8-Bit Register (Unsigned vs Signed Two's Complement)

If the leftmost bit (MSB) is `1`, Two's Complement treats the 8-bit value as negative (-91).

Unsigned=165โ€…โ€Š(Max 255),Signed=โˆ’91\text{Unsigned} = 165 \;(\text{Max } 255), \quad \text{Signed} = -91