How do I convert decimal to binary?
To convert a decimal number to binary, repeatedly divide the number by 2 and record the remainders from bottom to top. For example, 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1. Reading remainders bottom-to-top gives 1101 in binary. Our converter does this instantly for any number.
What is hexadecimal used for in programming?
Hexadecimal (base 16, using digits 0–9 and A–F) is used extensively in programming because each hex digit represents exactly 4 binary bits (a nibble). This makes it very compact for representing binary data. Common uses include: CSS colors (#FF5733), memory addresses (0x7FFF0000), Unicode code points (U+1F600), and byte values in network protocols.
What is two's complement?
Two's complement is the standard method computers use to represent negative integers in binary. For an N-bit number, the two's complement is calculated as 2^N minus the positive value. In 8-bit: -5 is represented as 11111011 (256 - 5 = 251, which is 0b11111011). It enables simple addition/subtraction circuits to handle both positive and negative numbers.
Why is octal (base 8) used in computing?
Octal was historically popular on early computers with 12, 24, or 36-bit word sizes (all divisible by 3). It remains in use today primarily for Unix/Linux file permissions. For example, chmod 755 means owner: 7 (rwx), group: 5 (r-x), others: 5 (r-x).
How do I read the bit visualization?
The bit visualization shows the binary representation as individual bit boxes, numbered from right (bit 0 = least significant) to left (highest bit = most significant). Illuminated boxes (green) represent 1 bits; dark boxes represent 0 bits. This helps you visually understand which powers of 2 make up the number.