Number Base Converter
Decompose a decimal integer into its 8-bit binary representation and hexadecimal nibbles without leaving the browser.
Results
What is it?
Computers store all data as binary (base 2). Hexadecimal (base 16) is a compact shorthand where each hex digit represents exactly 4 binary bits (a "nibble"). Decimal 255 = binary 11111111 = hex FF. This calculator breaks down any byte-range integer into its binary bits and hex nibbles.
How to use
Enter a decimal integer and choose the byte range. The binary output shows all 8 bits of the lowest byte (read left to right from bit 7 to bit 0). Upper and lower nibbles give the two hex digits (0-15 each; convert to hex: 0-9 stay as-is, 10=A, 11=B ... 15=F).
Example scenario
Decimal 170: upper nibble = 10 (hex A), lower nibble = 10 (hex A) -> hex AA. Binary: 10101010. This is the classic 0xAA test pattern used in memory diagnostics because it alternates every bit. Decimal 255 -> upper=15(F), lower=15(F) -> hex FF -> binary 11111111.
Pro tip
Memorise powers of 2 up to 128: 1, 2, 4, 8, 16, 32, 64, 128. Each bit position represents one of these values. Hex is used ubiquitously in computing: color codes (#FF5733), memory addresses (0x7FFF), IP addresses in network code, and binary file headers. Nibble-to-hex: 0=0, 1=1 ... 9=9, 10=A, 11=B, 12=C, 13=D, 14=E, 15=F.