9.2 Binary, Octal, Decimal, Hexadecimal Conversions & File Formats

Key Takeaways

  • Digital computing is built upon positional radix number systems: Binary (radix 2: {0,1}), Octal (radix 8: {0-7}), Decimal (radix 10: {0-9}), and Hexadecimal (radix 16: {0-9, A-F}).
  • Base conversion algorithms employ successive division (for integer components) and successive multiplication (for fractional components) when transforming decimal values, while bit-grouping (3 bits for octal, 4 bits for hex) enables rapid direct interconversion.
  • Data storage hierarchies follow exponential scales where 1 Nibble = 4 bits, 1 Byte = 8 bits, and binary IEC standards ($2^{10} = 1024$: KiB, MiB, GiB, TiB, PiB) diverge mathematically from decimal SI standards ($10^3 = 1000$: KB, MB, GB, TB, PB).
  • Multimedia and document file formats utilize lossy compression (JPEG, MP3, MP4) to discard perceptually redundant information for compactness, or lossless compression (PNG, FLAC, SVG, TIFF) to ensure bit-for-bit data preservation.
Last updated: August 2026

Binary, Octal, Decimal, Hexadecimal Conversions & File Formats

Quick Answer: Digital computing systems utilize positional number systems with distinct radix bases: Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16, where $A=10$ through $F=15$). Conversions rely on successive division/multiplication for decimal mappings and direct 3-bit (octal) or 4-bit (hexadecimal) binary grouping. Storage capacity scales in binary factors of $2^{10} = 1024$ (Byte, KB, MB, GB, TB, PB, EB, ZB, YB), while multimedia file extensions are governed by lossy or lossless compression standards.


1. Positional Number Systems in Digital Computing

In a positional number system, the value of any digit depends on its face value, its position relative to the radix point, and the base (radix, denoted $r$) of the system. The value of a general number $N$ with integer digits $d_i$ and fractional digits $d_{-j}$ is expressed as:

N=i=0n1diri+j=1mdjrjN = \sum_{i=0}^{n-1} d_i \cdot r^i + \sum_{j=1}^{m} d_{-j} \cdot r^{-j}

Number SystemRadix (Base $r$)Allowed Digits / SymbolsWeight of Positions (Integer $\leftarrow$ Radix Point $\rightarrow$ Fractional)
Binary2$0, 1$$\dots, 2^3 (8), 2^2 (4), 2^1 (2), 2^0 (1) ;.; 2^{-1} (0.5), 2^{-2} (0.25), 2^{-3} (0.125), \dots$
Octal8$0, 1, 2, 3, 4, 5, 6, 7$$\dots, 8^3 (512), 8^2 (64), 8^1 (8), 8^0 (1) ;.; 8^{-1} (0.125), 8^{-2} (0.015625), \dots$
Decimal10$0, 1, 2, 3, 4, 5, 6, 7, 8, 9$$\dots, 10^3 (1000), 10^2 (100), 10^1 (10), 10^0 (1) ;.; 10^{-1} (0.1), 10^{-2} (0.01), \dots$
Hexadecimal16$0\text{--}9, \text{A, B, C, D, E, F}$$\dots, 16^3 (4096), 16^2 (256), 16^1 (16), 16^0 (1) ;.; 16^{-1} (0.0625), \dots$

[!NOTE] In Hexadecimal, alphabetic letters represent values from 10 to 15:
$\text{A} = 10, \quad \text{B} = 11, \quad \text{C} = 12, \quad \text{D} = 13, \quad \text{E} = 14, \quad \text{F} = 15$


2. Step-by-Step Conversion Algorithms and Numerical Methods

A. Decimal to Any Base (Successive Division / Multiplication Method)

  1. Integer Part: Continuously divide the decimal integer by the target base $r$. Record the integer remainder at each stage until the quotient becomes 0. Read remainders from bottom to top (Most Significant Digit [MSD] to Least Significant Digit [LSD]).
  2. Fractional Part: Continuously multiply the fractional part by the target base $r$. Record the generated integer digit at each step. Multiply only the remaining fractional component until it reaches 0 or achieves desired precision. Read generated integers from top to bottom.

Worked Example 1: Convert $(75.625){10}$ to Binary $(?){2}$

  • Integer Conversion ($75 \div 2$):
    • $75 \div 2 = 37$, remainder 1 (LSD)
    • $37 \div 2 = 18$, remainder 1
    • $18 \div 2 = 9$, remainder 0
    • $9 \div 2 = 4$, remainder 1
    • $4 \div 2 = 2$, remainder 0
    • $2 \div 2 = 1$, remainder 0
    • $1 \div 2 = 0$, remainder 1 (MSD)
    • Reading bottom-up: $(75)_{10} = (1001011)_2$
  • Fractional Conversion ($0.625 \times 2$):
    • $0.625 \times 2 = \mathbf{1}.25 \rightarrow$ Integer 1
    • $0.25 \times 2 = \mathbf{0}.50 \rightarrow$ Integer 0
    • $0.50 \times 2 = \mathbf{1}.00 \rightarrow$ Integer 1
    • Reading top-down: $(0.625)_{10} = (0.101)_2$
  • Combined Result: $(75.625)_{10} = (1001011.101)_2$
Loading diagram...
Interconversion Map Between Digital Number Systems

B. Direct Grouping Methods (Binary $\leftrightarrow$ Octal $\leftrightarrow$ Hexadecimal)

Because $8 = 2^3$ and $16 = 2^4$, conversions between Binary, Octal, and Hexadecimal bypass decimal arithmetic through direct bit-grouping:

  • Binary to Octal: Partition the binary bitstream into groups of 3 bits starting from the radix point (leftward for integers, rightward for fractions, padding with leading/trailing zeros as needed). Replace each 3-bit cluster with its octal equivalent.
  • Binary to Hexadecimal: Partition the binary bitstream into groups of 4 bits starting from the radix point. Replace each 4-bit cluster with its hexadecimal digit ($0\text{--}9, \text{A--F}$).
  • Octal / Hexadecimal to Binary: Expand each octal digit into its precise 3-bit binary equivalent, or each hexadecimal digit into its 4-bit binary equivalent.

Direct Binary Equivalence Reference Table:

Decimal4-Bit BinaryOctal (3-bit)Hexadecimal
000000 (000)0
100011 (001)1
200102 (010)2
300113 (011)3
401004 (100)4
501015 (101)5
601106 (110)6
701117 (111)7
8100010 (001 000)8
9100111 (001 001)9
10101012 (001 010)A
11101113 (001 011)B
12110014 (001 100)C
13110115 (001 101)D
14111016 (001 110)E
15111117 (001 111)F

Worked Example 2: Convert Binary $(1101011110.1011)_2$ to Hexadecimal and Octal

  1. Hexadecimal Grouping (4 bits from radix point):
    • Integer part: 0011 0101 1110 (padded two leading zeros to complete left cluster)
      • 0011 = $3$, 0101 = $5$, 1110 = $\text{E} (14)$
    • Fractional part: 1011 = $\text{B} (11)$
    • Hexadecimal result: $(35\text{E}.\text{B})_{16}$
  2. Octal Grouping (3 bits from radix point):
    • Integer part: 001 101 011 110 (padded two leading zeros)
      • 001 = $1$, 101 = $5$, 011 = $3$, 110 = $6$
    • Fractional part: 101 100 (padded two trailing zeros)
      • 101 = $5$, 100 = $4$
    • Octal result: $(1536.54)_8$

Worked Example 3: Convert Hexadecimal $(2\text{C}7)_{16}$ to Decimal

(2\text{C}7)_{16} &= 2 \times 16^2 + \text{C} \times 16^1 + 7 \times 16^0 \\ &= 2 \times 256 + 12 \times 16 + 7 \times 1 \\ &= 512 + 192 + 7 = (711)_{10} \end{aligned}$$

3. Hierarchy of Digital Data Storage Units

Digital data is quantified in discrete binary units. UGC NET questions frequently test hierarchical sequencing and conversions across both binary (IEC) and decimal (SI) notations:

Elementary Storage Units

  • Bit (b): Binary Digit; the fundamental atomic unit of digital information, representing either a 0 (low voltage / off) or a 1 (high voltage / on).
  • Nibble: A cluster of 4 contiguous bits (or half a byte). One hexadecimal digit precisely maps to one nibble.
  • Byte (B): A collection of 8 bits. The universal basic addressable unit of computer memory, capable of representing $2^8 = 256$ distinct values (e.g., one standard ASCII character).
  • Word: The natural data width processed by a computer's CPU architecture in a single clock cycle (e.g., 16-bit word = 2 bytes; 32-bit word = 4 bytes; 64-bit word = 8 bytes).

Storage Capacity Hierarchy (Powers of 1024 vs. Powers of 1000)

In computer architecture, data storage scales in powers of 2 ($2^{10} = 1024$), whereas telecommunication bandwidth and commercial drive manufacturers often use decimal SI powers of 10 ($10^3 = 1000$).

UnitAbbr.Binary Equivalent (IEC / Computing Standard)Exact Bytes ($2^N$)Decimal Multiple (SI Standard)
Kilobyte (Kibibyte)KB (KiB)$1024\text{ Bytes} = 2^{10}\text{ B}$$1,024\text{ B}$$10^3\text{ B} = 1,000\text{ B}$
Megabyte (Mebibyte)MB (MiB)$1024\text{ KB} = 2^{20}\text{ B}$$1,048,576\text{ B}$$10^6\text{ B} = 1,000,000\text{ B}$
Gigabyte (Gibibyte)GB (GiB)$1024\text{ MB} = 2^{30}\text{ B}$$1,073,741,824\text{ B}$$10^9\text{ B} = 10^9\text{ B}$
Terabyte (Tebibyte)TB (TiB)$1024\text{ GB} = 2^{40}\text{ B}$$1,099,511,627,776\text{ B}$$10^{12}\text{ B}$
Petabyte (Pebibyte)PB (PiB)$1024\text{ TB} = 2^{50}\text{ B}$$2^{50}\text{ B} \approx 1.1259 \times 10^{15}\text{ B}$$10^{15}\text{ B}$
Exabyte (Exbibyte)EB (EiB)$1024\text{ PB} = 2^{60}\text{ B}$$2^{60}\text{ B} \approx 1.1529 \times 10^{18}\text{ B}$$10^{18}\text{ B}$
Zettabyte (Zebibyte)ZB (ZiB)$1024\text{ EB} = 2^{70}\text{ B}$$2^{70}\text{ B} \approx 1.1805 \times 10^{21}\text{ B}$$10^{21}\text{ B}$
Yottabyte (Yobibyte)YB (YiB)$1024\text{ ZB} = 2^{80}\text{ B}$$2^{80}\text{ B} \approx 1.2089 \times 10^{24}\text{ B}$$10^{24}\text{ B}$

[!TIP] Memory Scale Mnemonic (Ascending Order):
Bit $\rightarrow$ Nibble $\rightarrow$ Byte $\rightarrow$ Kilo $\rightarrow$ Mega $\rightarrow$ Giga $\rightarrow$ Tera $\rightarrow$ Peta $\rightarrow$ Exa $\rightarrow$ Zetta $\rightarrow$ Yotta
(Remember: Kids Make Great Teachers, Polishing Every Zesty Yarn)


4. File Formats, MIME Types & Compression Paradigms

Digital files are encoded using specialized formatting structures and compression algorithms tailored to their respective media categories.

Lossy vs. Lossless Compression

  • Lossy Compression: Permanently discards mathematically redundant or perceptually imperceptible information (e.g., frequencies outside human hearing range, subtle color variations). Yields very high compression ratios but prevents bit-for-bit reconstruction of the original file (ideal for web streaming and consumer multimedia).
  • Lossless Compression: Reduces file size by identifying and eliminating statistical redundancy using encoding algorithms (e.g., Run-Length Encoding, Huffman Coding, LZW). Allows 100% bit-for-bit reconstruction of original source data upon decompression (mandatory for text, executables, medical imaging, and archival records).

Comprehensive Media Format Classification

Media DomainFile Extension / FormatCompression TypePrimary Characteristics & Exam Relevance
AudioMP3 (MPEG-1 Audio Layer III)LossyStandard compressed audio format for web transmission and consumer devices
WAV (Waveform Audio)Uncompressed / LosslessStandard raw PCM audio format developed by Microsoft & IBM; large file size
AAC (Advanced Audio Coding)LossySuccessor to MP3 offering superior audio fidelity at equivalent bitrates
FLAC (Free Lossless Audio Codec)LosslessOpen-source audio codec that reduces file size by 50–60% with zero quality loss
ImageJPEG / JPG (Joint Photographic Experts Group)LossyStandard 24-bit true color format (16.7M colors) for photographs; no alpha transparency
PNG (Portable Network Graphics)LosslessRaster image format supporting 24-bit color and 8-bit alpha-channel transparency
GIF (Graphics Interchange Format)Lossless (8-bit)Indexed color format restricted to 256 colors; supports frame-by-frame animation
SVG (Scalable Vector Graphics)Lossless (Vector)XML-based 2D vector graphic format; infinitely scalable without pixelation
TIFF (Tagged Image File Format)Lossless / UncompressedHigh-depth raster format used in professional desktop publishing and medical imaging
VideoMP4 (MPEG-4 Part 14)LossyUniversal digital multimedia container format utilizing H.264/H.265/HEVC video codecs
AVI (Audio Video Interleave)Lossy / LosslessMultimedia container format introduced by Microsoft in 1992
MKV (Matroska Video)ContainerOpen-standard container holding unlimited video, audio, picture, and subtitle tracks
MOV (Apple QuickTime Movie)LossyProprietary multimedia container format developed by Apple
DocumentPDF (Portable Document Format)Lossless / StructuredISO-standard platform-independent electronic document format developed by Adobe
DOCX / XLSX / PPTXXML CompressedOpenXML document formats utilizing ZIP-compressed XML architectures (Microsoft Office)
CSV (Comma-Separated Values)Plain TextHuman-readable delimited plain-text table storing tabular database records
Test Your Knowledge

What is the decimal equivalent of the binary number (101101)₂?

A
B
C
D
Test Your Knowledge

Which of the following binary bitstreams represents the direct hexadecimal equivalent of (4F)₁₆?

A
B
C
D
Test Your Knowledge

Which of the following correctly arranges the digital storage units in strict ascending order of capacity?

A
B
C
D
Test Your Knowledge

Which image file format utilizes an XML-based mathematical vector structure that allows graphics to be scaled infinitely without experiencing raster pixelation?

A
B
C
D