Mathematics
8 min read

How Binary, Decimal, and Hexadecimal Number Systems Actually Work in Computing

Demystify computer arithmetic: understand positional radix systems, how transistors translate voltage into 1s and 0s, and why developers love hexadecimal color codes.

A
AnantAstra Computer Science Desk
Systems Architecture & Low-Level Programming
Live Interactive Utility
Try Decimal & Binary Converter Online
Free, instant calculations running 100% in your browser.
Inspect Bitboards & Convert Bases Live

Introduction: Positional Radix Systems

All number systems used in modern mathematics and computing are positional radix systems, where the value of each digit depends upon its position relative to the base:

$$\text{Value} = \sum_{i=0}^{n-1} d_i \times \text{Base}^i$$


The 4 Primary Computing Bases

  1. Decimal (Base 10): Uses digits 0–9. Built on human anatomy (10 fingers).
  2. Binary (Base 2): Uses digits 0, 1. Powers physical CPU registers, memory buses, and logic gates.
  3. Hexadecimal (Base 16): Uses digits 0–9 and letters A–F (where A=10, B=11, C=12, D=13, E=14, F=15). Widely used for memory addresses, CSS hex colors (#3B82F6), and MAC addresses.
  4. Octal (Base 8): Uses digits 0–7. Commonly used in Unix file system permissions (e.g., chmod 755).

Conversion Examples

Converting Decimal 42 to Binary (Repeated Division by 2):

  • 42 ÷ 2 = 21 remainder 0
  • 21 ÷ 2 = 10 remainder 1
  • 10 ÷ 2 = 5 remainder 0
  • 5 ÷ 2 = 2 remainder 1
  • 2 ÷ 2 = 1 remainder 0
  • 1 ÷ 2 = 0 remainder 1

Reading remainders bottom-to-top: `101010₂`

Converting Binary 101010₂ Back to Decimal:

$$\begin{aligned} & 1 \times 2^5 + 0 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 \\ &= 32 + 0 + 8 + 0 + 2 + 0 = 42 \end{aligned}$$

Test synchronized 4-base conversions and toggle individual bits on our **Decimal & Binary Converter**.

Run Computations Client-Side
Ready to use the Decimal & Binary Converter?
No sign-up, no server storage, and zero tracking cookies. Test your figures right now.

Frequently Asked Questions

Computer hardware is built from billions of microscopic silicon transistors. Transistors are physical electronic switches that can easily reliably distinguish between two states: OFF (0 volts / Low) and ON (voltage present / High).
Related Search Topics & Keywords
#binary to decimal conversion steps
#decimal to binary formula
#how hexadecimal works in computing
#hex to decimal conversion formula
#base 2 base 10 base 16 conversion
#binary bitboard calculator
A
AnantAstra Computer Science Desk
Systems Architecture & Low-Level Programming

Published by AnantAstra's engineering and research desk. All calculations, privacy guarantees, and algorithms referenced in this article are open-source and run client-side in the browser.

Recommended Further Reading

Comprehensive FY 2025-26 salary tax analysis: understand the ₹75,000 standard deduction, the ₹7.75 Lakh tax-free threshold under 87A rebate, and the exact deduction breakeven point.

Read Guide

Understand exact GST mathematical formulas: reverse-calculate original base prices from inclusive totals, add tax to net amounts, and accurately split CGST, SGST, and IGST.

Read Guide

Demystify monthly loan repayments: uncover the reducing-balance EMI formula, how banks front-load interest in amortization schedules, and how small prepayments shave years off your tenure.

Read Guide