Number Systems and Base Conversion Principles

Fundamentals of Number Systems

In digital systems and mathematics, a number system is a structured framework used to express quantities through a set of symbols and mathematical rules. Most standard number systems are positional, meaning that the specific position of a digit within a sequence determines its weighted contribution to the total numerical value. The foundational parameter of any positional number system is its base or radix, denoted as rr. In a system with radix rr, the total number of unique symbols or digits available is exactly equal to rr, and these digits range in value from 00 up to r−1r - 1.

The most widely recognized positional system in human daily life is the decimal number system, which operates with a base of 1010. The available digits in the decimal system are 0,1,2,3,4,5,6,7,8,90, 1, 2, 3, 4, 5, 6, 7, 8, 9, and digit positions correspond to powers of 1010. In contrast, electronic digital systems primarily utilize the binary number system due to its binary physical implementation. The binary system operates with a base of 22, utilizing only two distinct binary digits, or bits, which are 00 and 11, with positional weights defined by powers of 22.

Beyond decimal and binary, digital computing frequently employs octal and hexadecimal number systems as human-readable representations of binary sequences. The octal number system has a base of 88 and uses eight unique digits ranging from 00 to 77, with positional weights expressed as powers of 88. The hexadecimal number system uses a base of 1616 and requires sixteen distinct symbols. To represent values above 99 using single characters, hexadecimal extends the standard decimal digits 0,1,2,3,4,5,6,7,8,90, 1, 2, 3, 4, 5, 6, 7, 8, 9 with the capital alphabetic letters A,B,C,D,E,F\text{A}, \text{B}, \text{C}, \text{D}, \text{E}, \text{F}, which represent the decimal values 10,11,12,13,14,1510, 11, 12, 13, 14, 15 respectively. The positional weights in hexadecimal are powers of 1616.

Number systems can also be constructed for any arbitrary radix following the exact same positional structure. For example, a Base-77 number system operates with a base of 77, offering seven distinct digits from 00 to 66 with positional weights evaluated in powers of 77. Similarly, a Base-44 number system operates with a base of 44, employing digits 0,1,2,30, 1, 2, 3 with weights in powers of 44. This fundamental format applies consistently regardless of the specific base rr selected.

Standard Base Representation and Digit Mapping

Understanding the direct equivalence between binary, octal, decimal, and hexadecimal representations for initial non-negative integers provides essential context for computer arithmetic and base conversions. Because four binary bits can represent 24=162^4 = 16 unique combinations, a single hexadecimal digit perfectly corresponds to a four-bit binary block, known as a nibble.

For the decimal value 00, the binary equivalent is 00000000, octal is 00, and hexadecimal is 00. For decimal 11, the representations are binary 00010001, octal 11, and hexadecimal 11. Decimal 22 converts to binary 00100010, octal 22, and hexadecimal 22. Decimal 33 corresponds to binary 00110011, octal 33, and hexadecimal 33. Decimal 44 translates to binary 01000100, octal 44, and hexadecimal 44. Decimal 55 yields binary 01010101, octal 55, and hexadecimal 55. Decimal 66 evaluates to binary 01100110, octal 66, and hexadecimal 66. Decimal 77 equals binary 01110111, octal 77, and hexadecimal 77.

When numerical values reach 88, octal notation rolls over into two digits because octal only contains symbols up to 77. Consequently, decimal 88 is represented as binary 10001000, octal 1010, and hexadecimal 88. Decimal 99 becomes binary 10011001, octal 1111, and hexadecimal 99. At decimal 1010, hexadecimal introduces alphabetical notation, yielding binary 10101010, octal 1212, and hexadecimal A\text{A}. Decimal 1111 corresponds to binary 10111011, octal 1313, and hexadecimal B\text{B}. Decimal 1212 translates to binary 11001100, octal 1414, and hexadecimal C\text{C}. Decimal 1313 converts to binary 11011101, octal 1515, and hexadecimal D\text{D}. Decimal 1414 gives binary 11101110, octal 1616, and hexadecimal E\text{E}. Finally, decimal 1515 corresponds to binary 11111111, octal 1717, and hexadecimal F\text{F}.

Conversion table for Binary, Octal, Decimal, and Hexadecimal values from 0 to 15

Base-R to Decimal Conversion Mechanics

Converting a number expressed in any arbitrary source base rr into its equivalent decimal (base 1010) representation relies on evaluating the polynomial expansion of the positional weighted sum. The general formula for converting a number from base rr to decimal is expressed as:

Decimal Value=∑(digit×rposition)\text{Decimal Value} = \sum ( \text{digit} \times r^{\text{position}} )

In this summation, each digit of the source number is multiplied by the base rr raised to the power of its position index. Positions for integer digits are indexed starting at 00 immediately to the left of the radix point and increment by 11 for each position moving leftwards (0,1,2,3,…0, 1, 2, 3, \dots). Positions for fractional digits are indexed starting at −1-1 immediately to the right of the radix point and decrement by 11 for each position moving rightwards (−1,−2,−3,…-1, -2, -3, \dots).

To demonstrate this mechanism, consider converting the binary number (1101.101)2(1101.101)_2 to decimal. The positional expansion multiplies each bit by its corresponding power of 22:

(1101.101)2=1×23+1×22+0×21+1×20+1×2−1+0×2−2+1×2−3(1101.101)_2 = 1 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 + 1 \times 2^{-1} + 0 \times 2^{-2} + 1 \times 2^{-3}

Evaluating these individual terms yields:

1×8+1×4+0×2+1×1+1×0.5+0×0.25+1×0.125=8+4+0+1+0.5+0+0.125=(13.625)101 \times 8 + 1 \times 4 + 0 \times 2 + 1 \times 1 + 1 \times 0.5 + 0 \times 0.25 + 1 \times 0.125 = 8 + 4 + 0 + 1 + 0.5 + 0 + 0.125 = (13.625)_{10}

A second example converts the octal number (572.6)8(572.6)_8 to decimal by evaluating powers of 88:

(572.6)8=5×82+7×81+2×80+6×8−1(572.6)_8 = 5 \times 8^2 + 7 \times 8^1 + 2 \times 8^0 + 6 \times 8^{-1}

Computing each weighted product gives:

5×64+7×8+2×1+6×0.125=320+56+2+0.75=(378.75)105 \times 64 + 7 \times 8 + 2 \times 1 + 6 \times 0.125 = 320 + 56 + 2 + 0.75 = (378.75)_{10}

A third example involves converting the hexadecimal number (2A.8)16(2\text{A}.8)_{16} to decimal. The letter A\text{A} is substituted with its decimal numerical equivalent of 1010:

(2A.8)16=2×161+10×160+8×16−1(2\text{A}.8)_{16} = 2 \times 16^1 + 10 \times 16^0 + 8 \times 16^{-1}

Evaluating these terms produces:

2×16+10×1+8×0.0625=32+10+0.5=(42.5)102 \times 16 + 10 \times 1 + 8 \times 0.0625 = 32 + 10 + 0.5 = (42.5)_{10}

A fourth example converts a number from an arbitrary base, such as (341.24)5(341.24)_5, into decimal using powers of 55:

(341.24)5=3×52+4×51+1×50+2×5−1+4×5−2(341.24)_5 = 3 \times 5^2 + 4 \times 5^1 + 1 \times 5^0 + 2 \times 5^{-1} + 4 \times 5^{-2}

Calculating the positional terms yields:

3×25+4×5+1×1+2×0.2+4×0.04=75+20+1+0.4+0.16=(96.56)103 \times 25 + 4 \times 5 + 1 \times 1 + 2 \times 0.2 + 4 \times 0.04 = 75 + 20 + 1 + 0.4 + 0.16 = (96.56)_{10}

Decimal to Base-R Conversion Procedures

Converting a decimal number into a target base rr requires separate computational techniques for the whole integer portion and the fractional portion. Integer conversion uses repeated division by the target base rr, whereas fractional conversion uses repeated multiplication by the target base r$.\n\nTo convert a decimal integer to base r,theintegerissuccessivelydividedby, the integer is successively divided byr.Ateachstep,theintegerquotientisretainedforthenextdivision,andtheintegerremainderisrecorded.Thisprocessrepeatsuntilthequotientbecomes. At each step, the integer quotient is retained for the next division, and the integer remainder is recorded. This process repeats until the quotient becomes0.Theremaindersproducedformthetargetbasedigits.TheveryfirstremaindergeneratedcorrespondstotheLeastSignificantBit(LSB)orLeastSignificantDigit,situatedinthe. The remainders produced form the target base digits. The very first remainder generated corresponds to the Least Significant Bit (LSB) or Least Significant Digit, situated in ther^0position.ThefinalremaindergeneratedbeforereachingazeroquotientrepresentstheMostSignificantBit(MSB)orMostSignificantDigit.Readingtheremaindersinreverseorder,fromMSBtoLSB,formsthecorrectconvertedbase−position. The final remainder generated before reaching a zero quotient represents the Most Significant Bit (MSB) or Most Significant Digit. Reading the remainders in reverse order, from MSB to LSB, forms the correct converted base-r sequence.\n\nTo convert (43)_{10}tobinary(baseto binary (base2),successivedivisionby), successive division by2 is performed:\n\n43 / 2 = 21 \quad \text{remainder } 1 \quad (\text{LSB})\n\n21 / 2 = 10 \quad \text{remainder } 1\n\n10 / 2 = 5 \quad \text{remainder } 0\n\n5 / 2 = 2 \quad \text{remainder } 1\n\n2 / 2 = 1 \quad \text{remainder } 0\n\n1 / 2 = 0 \quad \text{remainder } 1 \quad (\text{MSB})\n\nCollecting the remainders from MSB to LSB gives (101011)_2$.

Repeated division-by-2 method for converting decimal 43 to binary

To convert a decimal fraction to base rr, repeated multiplication by rr is used. The fractional number is multiplied by rr, creating a product with an integer part and a fractional part. The integer portion (the carry) is extracted and recorded, while the remaining fractional part is multiplied by rr in the next step. This sequence continues until the fractional product reaches exactly 00 or until the desired degree of precision is achieved. The carried integer digits form the converted fractional answer. In fractional conversion, the first carry produced represents the Most Significant Bit (MSB), placed immediately after the radix point, and the last carry produced represents the Least Significant Bit (LSB).

To convert (0.3125)10(0.3125)_{10} to binary, successive multiplication by 22 is performed:

0.3125×2=0.625carry 0(MSB)0.3125 \times 2 = 0.625 \quad \text{carry } 0 \quad (\text{MSB})

0.625×2=1.25carry 10.625 \times 2 = 1.25 \quad \text{carry } 1

0.25×2=0.50carry 00.25 \times 2 = 0.50 \quad \text{carry } 0

0.5×2=1.00carry 1(LSB)0.5 \times 2 = 1.00 \quad \text{carry } 1 \quad (\text{LSB})

Extracting the carries from MSB to LSB produces (.0101)2(.0101)_2, so (0.3125)10=(0.0101)2(0.3125)_{10} = (0.0101)_2. If a decimal fractional part never terminates at 00 during multiplication, standard practice is to compute 55 to 66 steps and append ellipsis dots to indicate infinite extension.

Repeated multiplication-by-2 method for converting decimal fraction 0.3125 to binary

When converting a full decimal number containing both integer and fractional components, such as (43.3125)10(43.3125)_{10}, the integer and fractional procedures are applied separately to the respective parts. Combining the previously calculated results yields (43.3125)10=(101011.0101)2(43.3125)_{10} = (101011.0101)_2. To convert decimal numbers to any other arbitrary target base NN, the identical algorithms are executed using NN as the divisor for division and multiplier for multiplication.

General Base-to-Base Conversion Strategies

When converting a number directly between two non-decimal bases, such as converting from base N1N_1 to base N2N_2, Decimal (base 1010) serves as a universal intermediate bridging step. The standard two-step conversion strategy is structured as follows:

Base N1→Decimal (Base 10)→Base N2\text{Base } N_1 \rightarrow \text{Decimal (Base } 10) \rightarrow \text{Base } N_2

First, the original number in base N1N_1 is converted to decimal by calculating its weighted positional expansion sum. Second, the resulting decimal value is converted to base N2N_2 by performing repeated division on the integer portion and repeated multiplication on the fractional portion using target base N_2$.\n\nTo illustrate this two-step process, consider converting (854.5)_9tobaseto base3$.

Step 1 consists of converting (854.5)9(854.5)_9 to Decimal (base 1010) using polynomial expansion in powers of 99:

(854.5)9=8×92+5×91+4×90+5×9−1(854.5)_9 = 8 \times 9^2 + 5 \times 9^1 + 4 \times 9^0 + 5 \times 9^{-1}

(854.5)9=8×81+5×9+4×1+5×(19)(854.5)_9 = 8 \times 81 + 5 \times 9 + 4 \times 1 + 5 \times \left( \frac{1}{9} \right)

(854.5)9=648+45+4+0.555...=(697.6)10(854.5)_9 = 648 + 45 + 4 + 0.555... = (697.6)_{10}

Step 2 consists of converting the decimal value (697.6)10(697.6)_{10} into base 33. For the integer component (697)10(697)_{10}, repeated division by 33 is executed:

697/3=232remainder 1(Digit 0, LSB)697 / 3 = 232 \quad \text{remainder } 1 \quad (\text{Digit } 0, \text{ LSB})

232/3=77remainder 1(Digit 1)232 / 3 = 77 \quad \text{remainder } 1 \quad (\text{Digit } 1)

77/3=25remainder 2(Digit 2)77 / 3 = 25 \quad \text{remainder } 2 \quad (\text{Digit } 2)

25/3=8remainder 1(Digit 3)25 / 3 = 8 \quad \text{remainder } 1 \quad (\text{Digit } 3)

8/3=2remainder 2(Digit 4)8 / 3 = 2 \quad \text{remainder } 2 \quad (\text{Digit } 4)

2/3=0remainder 2(Digit 5, MSB)2 / 3 = 0 \quad \text{remainder } 2 \quad (\text{Digit } 5, \text{ MSB})

Reading the remainders from MSB (Digit 55) to LSB (Digit 00) yields the integer base-33 sequence (221211)_3$.\n\n![Division table converting decimal 697 to base 3](https://assets.knowt.com/pdf-flow-prod/9714bcbc-0216-4573-8a09-46b8653f5bf9-figures/6.png)\n\nFor the fractional component (0.6)_{10},repeatedmultiplicationby, repeated multiplication by3 is executed:\n\n0.6 \times 3 = 1.8 \quad \text{carry } 1\n\n0.8 \times 3 = 2.4 \quad \text{carry } 2\n\n0.4 \times 3 = 1.2 \quad \text{carry } 1\n\n0.2 \times 3 = 0.6 \quad \text{carry } 0\n\n0.6 \times 3 = 1.8 \quad \text{carry } 1\n\n0.8 \times 3 = 2.4 \quad \text{carry } 2\n\nReading the carries in chronological order gives the non-terminating fractional representation (.121012…)_3$. Combining the integer and fractional parts yields the final solution (854.5)_9 = (221211.121012...)_3$.\n\n# Rationale for Using Binary in Digital Systems\n\nBinary representation serves as the universal foundational architecture across all modern electronic computing and digital communication systems. The decision to construct computer hardware exclusively around base-2 binary logic rather than higher decimal or analog bases is driven by several fundamental engineering and mathematical advantages.\n\nFirst, binary system architecture relies on only two distinct physical states (0andand1). This binary simplicity drastically streamlines physical hardware design, making integrated circuits, logic gates, and microprocessors significantly simpler, smaller, and more cost-effective to manufacture at scale.\n\nSecond, binary systems exhibit exceptional resistance to physical signal noise. Because a circuit only needs to distinguish between two discrete voltage levels (such as high and low voltage representing 1andand0), wide voltage thresholds can be established. This physical margin minimizes errors caused by voltage fluctuations, thermal noise, and signal degradation during data processing and transmission.\n\nThird, digital hardware circuits operating on binary logic are straightforward to construct using semiconductor transistors functioning as binary switches. A transistor can easily be driven between complete saturation (ON state, representing binary 1)andcutoff(OFFstate,representingbinary) and cutoff (OFF state, representing binary0$$), avoiding the complex analog calibration required to maintain intermediate signal levels.

Fourth, binary data representations facilitate efficient and straightforward error detection and error correction techniques. Protocols such as parity bits, Hamming codes, and cyclic redundancy checks (CRC) rely on simple binary logic operations to identify and correct bit corruption in transmission and storage.

Fifth, Boolean algebra provides a comprehensive and rigorous mathematical framework designed specifically around binary variables. Boolean logic equations enable hardware engineers to mathematically model, simplify, and optimize complex digital logical circuits before physical hardware implementation.

Sixth, binary representation simplifies physical computer memory and storage architecture. Memory cells in magnetic drives, optical media, and solid-state drives (SSD) can be reliably engineered to store single binary bits by representing clean ON/OFF, charged/uncharged, or magnetized/demagnetized states.