postUpdated Apr 15, 2026

Data Representation & Number Systems – Complete Notes for IBPS, SSC, RRB & Govt Exams

Number Systems and Data Representation is a guaranteed scoring topic in IBPS, SSC CGL, RRB NTPC, and other government exams. This post covers all four number systems (Binary, Decimal, Octal, Hexadecimal), step-by-step conversion methods with solved examples, coding systems (BCD, ASCII, EBCDIC, Unicode), and Logic Gates — with memory tricks, one-liners, and 10 exam-focused FAQs.

Data Representation & Number Systems – Complete Notes for IBPS, SSC, RRB & Govt Exams

Jump to section

Introduction: Why Number Systems Matter in Govt Exams

Number Systems and Data Representation is one of the most scoring topics in Computer Awareness — but only if you understand the logic behind conversions, because exam questions are not always straightforward. They test your ability to convert numbers between systems quickly and accurately.

In exams like IBPS PO, IBPS Clerk, SBI Clerk, SSC CGL, RRB NTPC, and LIC AAO, this chapter appears as:

  • Direct conversion MCQs: "Convert (43)₁₀ to binary" → (101011)₂
  • Coding system MCQs: "ASCII-7 can represent ___ characters" → 128
  • Logic gate MCQs: "Which gate gives output 1 only when both inputs are 1?" → AND Gate
  • Coding identification: "Which code is used by banks to read cheques?" → MICR (ties to Chapter 4)
  • "Which are called Universal Gates?" → NAND and NOR

This chapter also forms the mathematical foundation of computer science — everything inside a computer is ultimately represented in binary (0s and 1s). Understanding why and how this works gives you a massive advantage in every computer awareness topic that follows.

This post covers all four number systemsevery conversion method with worked examplesall four coding systems, and all seven logic gates — completely exam-ready.


How Computers Represent Data Internally

Computers are electronic devices — their basic electronic components (transistors) have only two stable states: ON (1) and OFF (0). This is why computers use the Binary Number System — it maps perfectly to the physical reality of electronic circuits.

Why can't computers use decimal? Decimal requires distinguishing between 10 different voltage levels (0-9). This is extremely difficult to implement reliably in electronic circuits. Binary only requires distinguishing between 2 states (0 and 1 — low voltage and high voltage), making it far more reliable and practical.

Data Representation in Computers:

Data TypeHow It Is Stored
NumbersBinary (0s and 1s)
Text/CharactersASCII or Unicode binary codes
ImagesBinary representation of pixel colours
AudioBinary representation of sound wave samples
VideoBinary representation of image frames + audio

Everything — your messages, photos, videos, bank records, emails — is ultimately stored as sequences of 0s and 1s in the computer's memory.


Types of Number Systems

number system is a mathematical notation for representing numbers using a set of digits (symbols). The most important property of a number system is its Base (Radix) — the total number of unique digits it uses.

Number SystemBaseDigits UsedPrimary Use
Decimal100, 1, 2, 3, 4, 5, 6, 7, 8, 9Human everyday use
Binary20, 1All computer operations
Octal80, 1, 2, 3, 4, 5, 6, 7Shorthand for binary (groups of 3 bits)
Hexadecimal160-9, A, B, C, D, E, FMemory addresses, colour codes, shorthand for binary

Decimal Number System (Base 10)

The Decimal system is the number system humans use in everyday life. It has base 10, meaning each position in a number represents a power of 10.

Positional Value Example: (425)₁₀ = 4×10² + 2×10¹ + 5×10⁰ = 400 + 20 + 5 = 425

Powers of 10: 1, 10, 100, 1000, 10000...

Binary Number System (Base 2)

The Binary system is the fundamental language of computers. It uses only two digits: 0 and 1. Each binary digit is called a bit (binary digit).

Positional values in binary are powers of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024...

Example: (1101)₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13 in decimal

Key Binary Terms:

  • Bit — Single binary digit (0 or 1)
  • Nibble — 4 bits
  • Byte — 8 bits
  • MSB (Most Significant Bit) — Leftmost bit (highest value)
  • LSB (Least Significant Bit) — Rightmost bit (lowest value)

Octal Number System (Base 8)

The Octal system uses base 8 with digits 0 through 7. It is used as a shorthand for binary — every 3 binary digits correspond to exactly one octal digit.

Powers of 8: 1, 8, 64, 512, 4096, 32768...

Why Octal? Because 2³ = 8, every group of 3 binary digits maps perfectly to one octal digit. This makes binary numbers much shorter and easier to read.

Hexadecimal Number System (Base 16)

The Hexadecimal (Hex) system uses base 16. Since we only have 10 digit symbols (0-9), it also uses letters A-F to represent values 10-15.

Decimal0123456789101112131415
Hex0123456789ABCDEF

Powers of 16: 1, 16, 256, 4096, 65536...

Why Hexadecimal? Because 2⁴ = 16, every group of 4 binary digits maps to exactly one hex digit. This makes binary representations of memory addresses and colour codes much more compact.

Real-World Uses of Hexadecimal:

  • Memory addresses: 0x1A2F3B
  • Web colour codes: #FF5733 (red=FF, green=57, blue=33)
  • MAC addresses: 00:1A:2B:3C:4D:5E

Number System Conversions - Step-by-Step with Examples

Decimal to Binary Conversion

Method: Repeatedly divide the decimal number by 2 and record the remainders. Read remainders from bottom to top (Last remainder = MSB).

Example: Convert (43)₁₀ to Binary

DivisionQuotientRemainder
43 ÷ 2211 (LSB)
21 ÷ 2101
10 ÷ 250
5 ÷ 221
2 ÷ 210
1 ÷ 201 (MSB)

Reading remainders from bottom to top: (43)₁₀ = (101011)₂

Verify: 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 1×1 = 32+0+8+0+2+1 = 43 ✓

Binary to Decimal Conversion

Method: Multiply each binary digit by its positional value (power of 2) and add all results. Start from the rightmost bit (2⁰) going left.

Example: Convert (110110)₂ to Decimal

Bit110110
Power of 22⁵=322⁴=162³=82²=42¹=22⁰=1
Value32160420

32 + 16 + 0 + 4 + 2 + 0 = (110110)₂ = (54)₁₀

Powers of 2 to Memorise: 2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128, 2⁸=256, 2⁹=512, 2¹⁰=1024

Binary to Octal Conversion

Method: Group binary digits in sets of 3 from the RIGHT. If needed, add leading zeros on the left to complete the leftmost group. Convert each group of 3 to its octal equivalent.

Binary to Octal Chart:

BinaryOctal
0000
0011
0102
0113
1004
1015
1106
1117

Example: Convert (110110100)₂ to Octal

Group in 3s from right: 110 | 110 | 100 110 = 6 | 110 = 6 | 100 = 4 (110110100)₂ = (664)₈

Binary to Hexadecimal Conversion

Method: Group binary digits in sets of 4 from the RIGHT. Convert each group of 4 to its hexadecimal equivalent.

Binary to Hex Chart:

BinaryHexBinaryHex
0000010008
0001110019
001021010A
001131011B
010041100C
010151101D
011061110E
011171111F

Example: Convert (11110101)₂ to Hexadecimal

Group in 4s from right: 1111 | 0101 1111 = F | 0101 = 5 (11110101)₂ = (F5)₁₆

Decimal to Octal Conversion

Method: Repeatedly divide by 8, record remainders. Read from bottom to top.

Example: Convert (125)₁₀ to Octal

DivisionQuotientRemainder
125 ÷ 8155
15 ÷ 817
1 ÷ 801

Reading bottom to top: (125)₁₀ = (175)₈

Decimal to Hexadecimal Conversion

Method: Repeatedly divide by 16, record remainders. Use A-F for remainders 10-15. Read from bottom to top.

Example: Convert (255)₁₀ to Hexadecimal

DivisionQuotientRemainder
255 ÷ 161515 = F
15 ÷ 16015 = F

Reading bottom to top: (255)₁₀ = (FF)₁₆

Octal to Hexadecimal and Vice Versa

The Golden Rule: Always convert via binary as an intermediate step.

Octal → Binary → Hexadecimal Hexadecimal → Binary → Octal

Example: Convert (664)₈ to Hexadecimal Step 1: (664)₈ → Binary: 6=110, 6=110, 4=100 → (110110100)₂ Step 2: Group in 4s from right: 0001 | 1011 | 0100 = 1 | B | 4 (664)₈ = (1B4)₁₆


Computer Coding Systems

Computers use standardised coding systems to represent text characters (letters, numbers, symbols, punctuation) in binary. Each character is assigned a unique binary code.

BCD (Binary Coded Decimal)

FeatureDetails
Developed byIBM
Bits used4 bits per decimal digit
RepresentsEach decimal digit (0-9) individually in binary
ExampleDecimal 49 → BCD: 0100 1001 (4 bits for "4", 4 bits for "9")
AdvantageNo size limit on the number; easy conversion between decimal and binary
LimitationWastes space — 4 bits can represent 0-15 but BCD only uses 0-9

BCD Table:

DecimalBCD
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001

ASCII (American Standard Code for Information Interchange)

ASCII is the most widely used character encoding standard for representing text in computers and communication systems.

FeatureASCII-7ASCII-8 (Extended)
Bits7 bits8 bits
Characters2⁷ = 128 unique characters (0-127)2⁸ = 256 unique characters (0-255)
CoversEnglish letters (A-Z, a-z), digits (0-9), punctuation, control charactersEverything in ASCII-7 + additional symbols, accented characters

Important ASCII Values to Remember:

CharacterASCII Value (Decimal)
'A' (uppercase A)65
'Z' (uppercase Z)90
'a' (lowercase a)97
'z' (lowercase z)122
'0' (digit zero)48
'9' (digit nine)57
Space32
Enter/Newline10

Key Exam Fact: Lowercase letters have higher ASCII values than uppercase letters (a=97 > A=65). Digits 0-9 have ASCII values 48-57.

EBCDIC (Extended Binary Coded Decimal Interchange Code)

FeatureDetails
Developed byIBM
Bits8 bits
Characters2⁸ = 256 possible combinations
Used inIBM mainframe computers exclusively
Key Difference from ASCIIDifferent bit patterns for the same characters; not compatible with ASCII

EBCDIC was the dominant character encoding in IBM mainframes before ASCII became the universal standard. Bank mainframes still use EBCDIC internally.

Unicode

FeatureDetails
Bits16 bits (basic); up to 32 bits for full Unicode
Characters65,536+ unique characters (2¹⁶ and beyond)
PurposeRepresents every character of every language in the world — including Chinese, Arabic, Hindi, Japanese, mathematical symbols, emojis
StandardUTF-8, UTF-16, UTF-32 are common Unicode encodings
Why neededASCII only covers English; EBCDIC is IBM-specific; the world needed a universal standard for the global internet

Unicode is the reason you can send a WhatsApp message in Hindi, receive a reply in Japanese, and see emojis — all on the same phone.

Quick Coding System Comparison:

SystemBitsCharactersUsed For
BCD4 bits/digit10 digitsDecimal digit encoding
ASCII-77 bits128English text in computers
ASCII-88 bits256Extended English + symbols
EBCDIC8 bits256IBM mainframes
Unicode16-32 bits65,536+All world languages

Logic Gates - The Building Blocks of Digital Circuits

Logic Gates are the fundamental electronic circuits that perform Boolean logical operations on binary inputs (0 or 1) to produce a binary output. Every digital circuit — from a simple calculator to a CPU with billions of transistors — is built from combinations of logic gates.

Truth Table shows all possible input combinations and their corresponding outputs.

Basic Logic Gates

AND Gate:

  • Symbol: A · B (multiplication)
  • Rule: Output is 1 only when ALL inputs are 1
  • Memory trick: "AND means BOTH must agree"
ABOutput (A AND B)
000
010
100
111

OR Gate:

  • Symbol: A + B (addition)
  • Rule: Output is 1 when AT LEAST ONE input is 1
  • Memory trick: "OR means ANY ONE is enough"
ABOutput (A OR B)
000
011
101
111

NOT Gate (Inverter):

  • Symbol: A' or Ā
  • Rule: Output is the opposite (complement) of input — flips 0 to 1 and 1 to 0
  • Inputs: Only one input (NOT gate is a single-input gate)
AOutput (NOT A)
01
10

NAND Gate (NOT + AND):

  • Symbol: (A · B)'
  • Rule: Output is 0 only when ALL inputs are 1 (opposite of AND)
  • Universal Gate — can be used to build any other gate
ABOutput (NAND)
001
011
101
110

NOR Gate (NOT + OR):

  • Symbol: (A + B)'
  • Rule: Output is 1 only when ALL inputs are 0 (opposite of OR)
  • Universal Gate — can be used to build any other gate
ABOutput (NOR)
001
010
100
110

XOR Gate (Exclusive OR):

  • Symbol: A ⊕ B
  • Rule: Output is 1 only when inputs are DIFFERENT (exactly one input is 1)
  • Memory trick: "eXclusive — only when they disagree"
ABOutput (XOR)
000
011
101
110

XNOR Gate (Exclusive NOR):

  • Symbol: (A ⊕ B)'
  • Rule: Output is 1 only when inputs are SAME
ABOutput (XNOR)
001
010
100
111

Universal Gates

Universal Gates are gates that can be used to construct any other logic gate and therefore any digital circuit. There are two universal gates:

GateWhy Universal
NANDAND = NAND + NOT; OR = NAND(NAND(A,A), NAND(B,B)); NOT = NAND(A,A)
NOROR = NOR + NOT; AND = NOR(NOR(A,A), NOR(B,B)); NOT = NOR(A,A)

Exam Tip: "Which gates are called Universal Gates?" → NAND and NOR. This is asked in almost every exam.

Sign Bit, One's Complement and Two's Complement

Sign Bit:

  • In binary representation of signed numbers, the Most Significant Bit (MSB) is the sign bit
  • 0 = Positive (+)
  • 1 = Negative (−)

One's Complement:

  • Obtained by inverting all bits (flip every 0 to 1, and every 1 to 0)
  • Example: One's complement of (1011)₂ = (0100)₂

Two's Complement:

  • Obtained by adding 1 to the One's Complement
  • Most widely used method for representing negative numbers in computers
  • Example: Two's complement of (1011)₂:
    • One's complement = (0100)₂
    • Add 1: (0100)₂ + 1 = (0101)₂

Memory Tricks

🔑 Number System Bases — "Do Binary Octal Hex":

Decimal=10 | Binary=2 | Octal=8 | Hex=16 Silly: "Dogs Bite On Heat"

🔑 Hexadecimal Letter Values:

A=10, B=11, C=12, D=13, E=14, F=15 Trick: "After 9, count A B C D E F = 10 11 12 13 14 15"

🔑 Conversion Grouping Rule:

Binary → Octal: group in 3s (because 2³=8) Binary → Hex: group in 4s (because 2⁴=16) Mnemonic: "Octal = 3 bits, Hex = 4 bits, Oh-Ha!"

🔑 Coding Systems — Bits and Characters:

BCD=4bits/digit | ASCII-7=7bits=128 chars | ASCII-8=8bits=256 chars | EBCDIC=8bits=256 chars | Unicode=16bits=65536 chars "Big Animals Always Eat Unicorns" = BCD, ASCII-7, ASCII-8, EBCDIC, Unicode

🔑 Logic Gates Output Summary:

AND = Both must be 1 → "All Agree" OR = At least one is 1 → "One is enough" NOT = Flip it → "No, the opposite!" NAND = Opposite of AND → "Not AND" NOR = Opposite of OR → "Not OR" XOR = Different inputs → "eXclusive different"

🔑 Universal Gates = NAND + NOR:

"Neither Nor Nand needs nothing else!" = NAND and NOR are UNIVERSAL

🔑 Powers of 2 (Memorise up to 2¹⁰):

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 Trick: each doubles — "1, 2, 4, 8... just keep doubling!"


One-Liner Recap (Quick Revision)

  1. Computers use the Binary Number System (base 2, digits 0 and 1) because transistors have only two states — ON (1) and OFF (0) — making binary the natural language of electronic circuits.
  2. The Decimal system has base 10 (digits 0-9), Binary has base 2 (0-1), Octal has base 8 (0-7), and Hexadecimal has base 16 (0-9, A-F where A=10 and F=15).
  3. To convert Decimal to Binary, repeatedly divide by 2 and read remainders from bottom to top — the last remainder is the Most Significant Bit (MSB).
  4. To convert Binary to Decimal, multiply each bit by its positional power of 2 (starting from 2⁰ at the rightmost bit) and add all the results together.
  5. To convert Binary to Octal, group bits in sets of 3 from the right and convert each group — because 2³ = 8, three binary digits map exactly to one octal digit.
  6. To convert Binary to Hexadecimal, group bits in sets of 4 from the right and convert each group — because 2⁴ = 16, four binary digits map exactly to one hex digit.
  7. To convert between Octal and Hexadecimal, always use Binary as an intermediate step — Octal → Binary → Hexadecimal (or vice versa).
  8. BCD (Binary Coded Decimal), developed by IBM, uses 4 bits to represent each decimal digit (0-9) individually, with no limit on the total number size.
  9. ASCII-7 uses 7 bits to represent 128 unique characters (2⁷), while Extended ASCII-8 uses 8 bits to represent 256 characters (2⁸), covering English text and symbols.
  10. EBCDIC (Extended Binary Coded Decimal Interchange Code), developed by IBM, uses 8 bits and is used exclusively in IBM mainframe computers.
  11. Unicode uses 16 or more bits and can represent over 65,536 characters (2¹⁶), covering every character of every language in the world, including Chinese, Arabic, Hindi, and emojis.
  12. An AND gate gives output 1 only when ALL inputs are 1; an OR gate gives output 1 when AT LEAST ONE input is 1; a NOT gate inverts the input.
  13. NAND and NOR are called Universal Gates because any logic circuit — including AND, OR, and NOT gates — can be built using only NAND gates or only NOR gates.
  14. XOR (Exclusive OR) gate gives output 1 only when inputs are different (one is 0 and the other is 1), making it the "disagreement" gate.
  15. In signed binary representation, the MSB (Most Significant Bit) is the Sign Bit — 0 means positive and 1 means negative; Two's Complement is the standard method for representing negative numbers.

Preparing for competitive exams requires consistent revision. Platforms like JobsMe simplify preparation through:

Stay updated, revise regularly, and attempt quizzes for better accuracy in UPSC, SSC CGL, IBPS PO/Clerk, SBI, RBI Grade B, RRB NTPC, Defence, and State PSC exams.

Free quiz • No signup required

Put this topic into practice with Daily Current Affairs Quiz – 14 April 2026 | SSC, Banking, UPSC. It is the quickest way to reinforce what you just learned.

Frequently Asked Questions

Why do computers use binary instead of decimal?
Computers use binary because their fundamental components — transistors — are electronic switches that have only two stable states: fully ON (conducting electricity, represented as 1) and fully OFF (not conducting, represented as 0). Building circuits that reliably distinguish between just two states is far simpler and more error-resistant than distinguishing between 10 decimal states (0–9 voltage levels). Binary also aligns perfectly with Boolean logic (True/False), which is the mathematical
What is the difference between the four number systems?
The four number systems differ in their base (radix): Decimal (base 10) uses digits 0–9 and is used by humans in everyday life. Binary (base 2) uses only 0 and 1 and is the native language of all computers. Octal (base 8) uses digits 0–7 and serves as shorthand for binary (every 3 binary digits = 1 octal digit). Hexadecimal (base 16) uses 0–9 and A–F and serves as compact shorthand for binary (every 4 binary digits = 1 hex digit), widely used in memory addresses and colour codes.
How do you convert decimal 100 to binary?
Divide repeatedly by 2: 100÷2=50 R0, 50÷2=25 R0, 25÷2=12 R1, 12÷2=6 R0, 6÷2=3 R0, 3÷2=1 R1, 1÷2=0 R1. Read remainders bottom to top: (100)₁₀ = (1100100)₂. Verify: 64+32+0+4+0+0+0 = 100 ✓
What is ASCII and how many characters can it represent?
ASCII (American Standard Code for Information Interchange) is the standard character encoding system that assigns a unique 7-bit or 8-bit binary code to every character. ASCII-7 uses 7 bits and represents 128 characters (2⁷) covering English letters (A–Z, a–z), digits (0–9), punctuation, and control characters. Extended ASCII-8 uses 8 bits and represents 256 characters (2⁸), adding additional symbols and accented characters. ASCII 'A' = 65, 'a' = 97, '0' = 48.
What is the difference between ASCII and Unicode?
ASCII uses 7 or 8 bits and represents a maximum of 128 or 256 characters — it covers English text well but cannot represent characters from other languages. Unicode uses a minimum of 16 bits and can represent 65,536+ characters (2¹⁶ and beyond), covering every character of every language in the world — Chinese, Arabic, Hindi, Japanese, Greek, mathematical symbols, and emojis. Unicode is the standard for all modern software, websites, and the global internet.
What is EBCDIC and where is it used?
EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit character encoding standard developed by IBM. It can represent 256 characters (2⁸) but uses different bit patterns than ASCII for the same characters, making them incompatible. EBCDIC is used exclusively in IBM mainframe computers — which means bank mainframes (that still process billions of transactions) use EBCDIC internally. Converting between ASCII and EBCDIC requires a translation table.
vetri

About the author

vetri