Number Systems and Base Conversion
, r-1. Digital hardware uses radix 2 because two voltage levels are reliable; humans prefer radix 10; programmers also use radix 8 (octal) and radix 16 (hexadecimal) as compact notations for binary bit patterns.
Digital Logic · topic
Positional systems and base conversion (integer and fraction parts, grouping for octal and hex, unknown-base equations), unsigned, sign-magnitude, 1's and 2's complement ranges and readings, r's and (r-1)'s complements, sign extension, excess-K, and the codes BCD, excess-3, 2421 and Gray with BCD addition.
, r-1. Digital hardware uses radix 2 because two voltage levels are reliable; humans prefer radix 10; programmers also use radix 8 (octal) and radix 16 (hexadecimal) as compact notations for binary bit patterns.
Unsigned binary encodes only non-negative integers. Processors also need negative values. Three classical encodings place a sign into a fixed-width bit pattern: sign-magnitude, ones' complement, and two's complement.
A binary code assigns a bit pattern to each symbol of a set (decimal digits, angles of a shaft encoder, and so on). Pure binary is efficient for arithmetic, but other codes are built for decimal I/O, for single-bit-change sequencing, or for self-complementing digit arithmetic.
One-page visual sheets for this topic, in the sheet library on the store. Previews are free; the full sheets come with the subject pack.