Skip to content
DLVSDigital Logic Visualizing System

Logic Lab

Number Systems

Bit, nibble, byte and word. Convert between binary, octal, decimal and hexadecimal, and see BCD and complements.

8-bit value, every reading

128
64
32
16
8
4
2
1
Type a number in base

Number systems

Binary0100 0001
Octal (8)101
Decimal (10)65
Hexadecimal (16)0x41

Signed representations

Unsigned65
Two’s complement65
One’s complement65

Codes

BCD (packed decimal)0110 0101
Gray code0110 0001
Gray decoded back126
Character (ASCII/Unicode)A
Character (EBCDIC)–

The same bits mean different things depending on how you read them. Two’s complement is what computers use for negatives: the top bit counts as −128. A group of 4 bits is a nibble, 8 bits a byte, and a word is however many bits the machine handles at once (here 8 bits = 2 nibbles = 1 bytes). Gray code changes one bit between neighbours, which is why Karnaugh maps use it. Typing in binary, octal, decimal or hex updates the switches live.