Binary Numeral System and Base Conversion Principles

Overview of Numeral Systems and Decimal Fundamentals

  • The decimal numeral system is a base-1010 positional system where each digit represents a multiplier for a power of 1010.

  • In a base-1010 system, valid digits range from 00 through 99.

  • Position values correspond to powers of 1010 starting from 10010^0 at the rightmost position (ones place\text{ones place}), 10110^1 (tens place\text{tens place}), 10210^2 (hundreds place\text{hundreds place}), and continuing to higher powers.

  • Detailed breakdown of decimal number 13710137_{10}:

    • Digit 77 occupies the 10010^0 position (100=110^0 = 1), representing 7×100=77 \times 10^0 = 7

    • Digit 33 occupies the 10110^1 position (101=1010^1 = 10), representing 3×101=303 \times 10^1 = 30

    • Digit 11 occupies the 10210^2 position (102=10010^2 = 100), representing 1×102=1001 \times 10^2 = 100

    • Polynomial expansion:     13710=(1×102)+(3×101)+(7×100)137_{10} = (1 \times 10^2) + (3 \times 10^1) + (7 \times 10^0)

    • Summation calculation:     100+30+7=137100 + 30 + 7 = 137

The Binary Numeral System (Base 2)

  • The binary system is a base-22 positional numeral system where all numbers are expressed as sums of powers of 22.

  • Valid digits in the binary system are strictly 00 and 11

  • Binary corresponds directly to electronic digital systems and computer states:

    • State 11 represents an "on" state

    • State 00 represents an "off" state

  • Subscript notation is used to distinguish binary numbers from decimal numbers, appending a subscript 22 (for example, 110121101_2).

  • Positional power values for base 22 from right to left:

    • First position (rightmost): 20=12^0 = 1

    • Second position: 21=22^1 = 2

    • Third position: 22=42^2 = 4

    • Fourth position: 23=82^3 = 8

    • Fifth position: 24=162^4 = 16

Converting Binary Numbers to Decimal

  • Conversion procedure from base 22 to base 1010:

    • Multiply each binary digit by its corresponding positional power of 22

    • Add all resulting products together to produce the base-1010 value

  • Conversion of 110121101_2 to Decimal:

    • Positional alignment:

    • Rightmost digit 11 is at position 202^0

    • Second digit 00 is at position 212^1

    • Third digit 11 is at position 222^2

    • Fourth digit 11 is at position 232^3

    • Polynomial expansion:     11012=(1×23)+(1×22)+(0×21)+(1×20)1101_2 = (1 \times 2^3) + (1 \times 2^2) + (0 \times 2^1) + (1 \times 2^0)

    • Intermediate calculation:     11012=8+4+0+11101_2 = 8 + 4 + 0 + 1

    • Final result:     11012=13101101_2 = 13_{10}

  • Conversion of 1112111_2 to Decimal:

    • Positional alignment:

    • Rightmost digit 11 is at position 202^0

    • Middle digit 11 is at position 212^1

    • Leftmost digit 11 is at position 222^2

    • Polynomial expansion:     1112=(1×22)+(1×21)+(1×20)111_2 = (1 \times 2^2) + (1 \times 2^1) + (1 \times 2^0)

    • Intermediate calculation:     1112=4+2+1111_2 = 4 + 2 + 1

    • Final result:     1112=710111_2 = 7_{10}

Converting Decimal Numbers to Binary

  • Method 1: Subtraction of Nearest Lower Powers of 22

    • Identify the largest power of 22 less than or equal to the target decimal value.

    • Subtract that power of 22 from the decimal value to get the remainder.

    • Repeat this process for all remaining values.

    • Determine the total number of required positional places. To include a maximum power of 2k2^k, k+1k + 1 positions are required (from 202^0 to 2k2^k).

    • Assign 11 to each included power position and 00 to unused power positions.

    • Conversion Example for 181018_{10}:

    • Largest power of 22 less than 1818 is 1616 (242^4)

    • Remainder calculation:       18−16=218 - 16 = 2

    • Remainder 22 corresponds to 212^1

    • Expression as sum of powers of 22:       1810=24+2118_{10} = 2^4 + 2^1

    • Required positions: 55 positions (202^0 through 242^4)

    • Bit assignments:

      • Position 242^4: 11

      • Position 232^3: 00

      • Position 222^2: 00

      • Position 212^1: 11

      • Position 202^0: 00

    • Resulting binary representation:       1810=10010218_{10} = 10010_2

    • Verification conversion back to decimal:       (1×24)+(0×23)+(0×22)+(1×21)+(0×20)=16+2=1810(1 \times 2^4) + (0 \times 2^3) + (0 \times 2^2) + (1 \times 2^1) + (0 \times 2^0) = 16 + 2 = 18_{10}

  • Method 2: Systematic Successive Division by 22

    • Continuously divide the decimal integer by 22

    • Record the quotient and remainder (00 or 11) for each division step

    • Repeat until the integer quotient reaches 00

    • The remainders represent the coefficients for powers of 22, where the first division remainder corresponds to 202^0

    • Construct the binary number by reading remainders from bottom to top (last division step to first division step)

    • Systematic Division for 13710137_{10}:

    • Step 1:       137÷2=68remainder 1(20 place)137 \div 2 = 68 \quad \text{remainder } 1 \quad (2^0 \text{ place})

    • Step 2:       68÷2=34remainder 0(21 place)68 \div 2 = 34 \quad \text{remainder } 0 \quad (2^1 \text{ place})

    • Step 3:       34÷2=17remainder 0(22 place)34 \div 2 = 17 \quad \text{remainder } 0 \quad (2^2 \text{ place})

    • Step 4:       17÷2=8remainder 1(23 place)17 \div 2 = 8 \quad \text{remainder } 1 \quad (2^3 \text{ place})

    • Step 5:       8÷2=4remainder 0(24 place)8 \div 2 = 4 \quad \text{remainder } 0 \quad (2^4 \text{ place})

    • Step 6:       4÷2=2remainder 0(25 place)4 \div 2 = 2 \quad \text{remainder } 0 \quad (2^5 \text{ place})

    • Step 7:       2÷2=1remainder 0(26 place)2 \div 2 = 1 \quad \text{remainder } 0 \quad (2^6 \text{ place})

    • Step 8:       1÷2=0remainder 1(27 place)1 \div 2 = 0 \quad \text{remainder } 1 \quad (2^7 \text{ place})

    • Reading remainders bottom-to-top yields:       13710=100010012137_{10} = 10001001_2

    • Systematic Division for 251025_{10}:

    • Bounds evaluation: 2525 lies between 1616 (242^4) and 3232 (252^5)

    • Subtraction breakdown:       25=16+8+1=24+23+2025 = 16 + 8 + 1 = 2^4 + 2^3 + 2^0

    • Step 1:       25÷2=12remainder 1(20 place)25 \div 2 = 12 \quad \text{remainder } 1 \quad (2^0 \text{ place})

    • Step 2:       12÷2=6remainder 0(21 place)12 \div 2 = 6 \quad \text{remainder } 0 \quad (2^1 \text{ place})

    • Step 3:       6÷2=3remainder 0(22 place)6 \div 2 = 3 \quad \text{remainder } 0 \quad (2^2 \text{ place})

    • Step 4:       3÷2=1remainder 1(23 place)3 \div 2 = 1 \quad \text{remainder } 1 \quad (2^3 \text{ place})

    • Step 5:       1÷2=0remainder 1(24 place)1 \div 2 = 0 \quad \text{remainder } 1 \quad (2^4 \text{ place})

    • Reading remainders bottom-to-top yields:       2510=11001225_{10} = 11001_2

    • Verification check:       (1×24)+(1×23)+(0×22)+(0×21)+(1×20)=16+8+0+0+1=2510(1 \times 2^4) + (1 \times 2^3) + (0 \times 2^2) + (0 \times 2^1) + (1 \times 2^0) = 16 + 8 + 0 + 0 + 1 = 25_{10}

Alternative Numeral Systems and High-Base Representations

  • Ternary Numeral System (Base 3)

    • System using base 33 positional notation

    • Valid digits are 00, 11, and 22

    • Successive positions represent powers of 33 (30,31,32,…3^0, 3^1, 3^2, \dots)

  • Hexadecimal Numeral System (Base 16)

    • System using base 1616 positional notation

    • Requires 1616 distinct digit values (00 through 1515)

    • To represent values 1010 through 1515 as single symbols without ambiguity, standard alphabetic letters are used:

    • 00 through 99 represent numeric values 00 through 99

    • AA represents value 1010

    • BB represents value 1111

    • CC represents value 1212

    • DD represents value 1313

    • EE represents value 1414

    • FF represents value 1515

  • Conversion of Decimal 251025_{10} to Hexadecimal (Base 16)

    • Power breakdown:     2510=16+925_{10} = 16 + 9

    • Expressed as powers of 1616:     2510=(1×161)+(9×160)25_{10} = (1 \times 16^1) + (9 \times 16^0)

    • Placeholders for hexadecimal positions:

    • Coefficient for 16116^1 position is 11

    • Coefficient for 16016^0 position is 99

    • Resulting hexadecimal representation:     2510=191625_{10} = 19_{16}

Universal Core Concept of Base Conversions

  • For any numeral system with base bb:

    • Numbers are written as sequences of positional digits corresponding to integer powers of bb (b0,b1,b2,b3,…b^0, b^1, b^2, b^3, \dots)

    • Conversion from base bb to base 1010 involves expanding into a positional sum of powers of bb

    • Conversion from base 1010 to base bb involves repeated division by bb, recording remainders at each step to determine digit coefficients from right to left (b0b^0 to bnb^n)