Number Systems and Data Representation

In short: Computers convert every number, character, sound wave and image into binary patterns of 0s and 1s processed by logic gates and stored in registers. Mastering base conversions, signed integer encodings, character sets and storage units gives you reliable accuracy across exams.

Where this topic sits in the syllabus

Number systems and data representation appear in Class XI for CBSE and ISC Computer Science, and in Computer Systems for Cambridge IGCSE. ICSE Computer Applications (86) omits base conversions and binary arithmetic, covering only ASCII, Unicode and bit/byte sizes in Class IX (Values and data types).

BoardClass / LevelOfficial Unit or Chapter NameScope in Official Syllabus
CBSEClass XI (Computer Science 083)Unit 1: Computer Systems and OrganisationMemory units (bit, byte, KB, MB, GB, TB, PB); Binary, Octal, Decimal and Hexadecimal conversions; ASCII, ISCII, Unicode (UTF8, UTF32).
CBSEClass XI (Informatics Practices 065)Unit 1: Introduction to Computer SystemUnits of memory (primary and secondary memory) only; base conversions and character encodings are absent.
ISCClass XI (Computer Science 868)SECTION A: 1. Numbers; 2. EncodingsBinary, octal, decimal, hexadecimal interconversions; 1's and 2's complement arithmetic; sign-magnitude, shifts, mantissa-exponent floating point; ASCII, ISCII, Unicode.
Cambridge IGCSEComputer Science 04781 Data representation (1.1 Number systems; 1.2 Text, sound and images; 1.3 Data storage and compression)Denary, binary (to 16-bit), hexadecimal conversions; 8-bit addition, overflow, logical shifts, 8-bit two's complement; ASCII, Unicode; sound sampling, image resolution and colour depth; KiB to EiB (1024); lossy/lossless compression.

Core ideas: positional bases and conversions

A positional number system weights each digit by a power of its base b. Moving leftward from position 0 (the rightmost digit), column weights run b0, b1, b2, b3.

  • Binary (base 2): Uses bits 0 and 1 (weights 1, 2, 4, 8, 16, 32, 64, 128) because logic gates and registers store two stable electrical states.
  • Octal (base 8): Uses digits 0 to 7 (weights 1, 8, 64, 512); each digit maps to 3 binary bits (000 to 111).
  • Decimal or denary (base 10): Uses digits 0 to 9 (weights 1, 10, 100, 1,000).
  • Hexadecimal (base 16): Uses 0 to 9 and A to F (10 to 15; weights 1, 16, 256, 4,096). Each hex digit encodes one 4-bit nibble (0000 to 1111), making binary compact and readable in memory addresses and colour codes.

Conversions: To convert binary, octal or hexadecimal to decimal, multiply each digit by its column weight bk and sum. To convert a decimal integer to base b, divide repeatedly by b and read remainders bottom-to-top. Between binary and octal, group bits in 3s from the right; between binary and hexadecimal, group bits in 4s from the right, padding leading 0s on the left.

Binary arithmetic, overflow, shifts and encodings

8-bit binary addition proceeds right-to-left: 0+0=0, 0+1=1, 1+1=0 (carry 1), and 1+1+1=1 (carry 1). An unsigned 8-bit register stores 0 to 255; any sum above 255 produces a 9th carry bit and an overflow error. A logical left shift by k places multiplies an unsigned integer by 2k (until a 1-bit shifts off the left); a logical right shift by k places integer-divides by 2k, filling vacated edges with 0s.

Signed integers: The leftmost bit is the most significant bit (MSB) and the rightmost is the least significant bit (LSB). Sign-magnitude uses the MSB for sign (0 positive, 1 negative), creating two zeros (+0 and -0) and extra addition logic. 1's complement flips every bit, still leaving two zeros. 2's complement flips every bit and adds 1; in 8 bits the MSB carries weight -128, giving one zero and range -128 (10000000) to +127 (01111111). Subtraction A-B becomes A+(-B).

Floating point (ISC Class XI): Real numbers use normalised binary scientific notation with a sign bit, mantissa (precision) and exponent (range), in single precision or double precision.

Text, media, units and compression: ASCII encodes basic English characters (7-bit); ISCII adds Indian scripts; Unicode (UTF-8, UTF-32) covers global scripts and emojis. Image size = width×height×colour depth; sound size = sample rate×sample resolution×duration×channels. Higher resolution, colour depth, sample rate or sample resolution improves accuracy and increases file size. Storage units step from bit (1), nibble (4 bits) and byte (8 bits) to KiB, MiB, GiB, TiB, PiB and EiB in exact 1,024 steps (IGCSE 0478), while CBSE lists KB, MB, GB, TB and PB. Lossless compression (like Run Length Encoding, RLE) reconstructs exact originals; lossy compression permanently removes detail to cut storage space, bandwidth and transmission time.

Worked examples (step by step)

Example 1 (Decimal to binary and hex): Convert 213 (base 10). Divide by 2 repeatedly: 213÷2=106 r1, 106÷2=53 r0, 53÷2=26 r1, 26÷2=13 r0, 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1. Remainders bottom-to-top give 11010101 (128+64+16+4+1=213). Nibbles 1101 (13=D) and 0101 (5) give D5 (base 16).

Example 2 (Binary to octal, hex and decimal): Convert 101110110 (base 2). Group in 3s from right: 101 110 110 gives octal 566. Pad left and group in 4s: 0001 0111 0110 gives hex 176. Check: (1×256)+(7×16)+6 = 256+112+6 = 374 (base 10).

Example 3 (8-bit addition and overflow): Add 10010110 (150) and 01111011 (123). Adding right-to-left yields 8-bit sum 00010001 (17) with a 9th carry-out bit of 1. Because 150+123=273 exceeds 255, an overflow error occurs.

Example 4 (8-bit two's complement subtraction): Compute 74-46. First, +46 = 00101110. Invert bits (1's complement): 11010001. Add 1: 11010010 (-46, since -128+64+16+2=-46). Add +74 (01001010) and 11010010: discarding the 9th carry leaves 00011100 = 16+8+4 = 28.

Example 5 (Logical shifts): Take 00101100 (44). A logical left shift by 2 places gives 10110000 = 128+32+16 = 176 (44×4). A logical right shift of 00101100 by 3 places drops trailing 100 and gives 00000101 = 5 (44÷8 integer quotient).

Example 6 (Sound file size): Find the size in KiB of a 32 s mono clip at 8,000 Hz and 16-bit resolution. Bits = 8,000×16×32 = 4,096,000 bits. Bytes = 4,096,000÷8 = 512,000 bytes. Divide by 1,024: 512,000÷1,024 = 500 KiB.

Common mistakes

WrongRightWhy
Dividing bytes by 1,000 for KiB or MiB.Divide by 1,024 per binary prefix step.IEC binary units (KiB, MiB, GiB) use powers of 210 = 1,024.
Grouping bits left-to-right for octal or hex.Group right-to-left (3 bits octal, 4 bits hex).Column weights anchor at the rightmost LSB.
Stopping after inverting bits for 2's complement.Invert all bits and then add 1.Inversion alone gives 1's complement, off by 1.
Writing nibble 10 to 15 as two digits, like 10F.Use single hex letters A to F (AF).Each 4-bit nibble maps to one hex symbol.
Ignoring a carry-out bit in 8-bit unsigned addition.Flag overflow whenever sum exceeds 255.An 8-bit register cannot hold values above 255.

Exam tips

  • Cambridge IGCSE Computer Science (0478) Paper 1 (1 hour 45 minutes, 75 marks, 50% of grade) prohibits calculators, so practise dividing by 2, 16 and 1,024 by hand.
  • CBSE Class XI Computer Science (083) allocates 10 of 70 theory marks to Unit 1: Computer Systems and Organisation (plus 30 practical marks), making base conversions high-yield.
  • ISC Class XI Computer Science (868) pairs Theory Paper I (3 hours, 70 marks) with an internally assessed 3-hour, 30-mark Practical Paper II; revise octal, 1's/2's complement and normalised floating point for Section A.
  • Show remainder tables, 3-bit or 4-bit groupings, carry bits and unit steps (bits to bytes to KiB/MiB) clearly for method marks.
  • Verify whether an 8-bit integer is unsigned (0 to 255) or two's complement (-128 to +127) before interpreting a leading 1.

Practice questions

Try each prompt before opening the answer.

  1. Convert decimal 149 to 8-bit binary and hexadecimal.
    Answer149 = 128+16+4+1 = 10010101 (binary); nibbles 1001 (9) and 0101 (5) give 95 (hex).
  2. Convert hexadecimal 3C to binary and decimal.
    Answer3 = 0011 and C = 1100 give 00111100 (binary); (3×16)+12 = 60 (decimal).
  3. Convert binary 11101011 directly to octal.
    AnswerGroup in 3s from right (011 101 011) to get 353 (octal).
  4. Add unsigned 8-bit integers 01011010 and 00110111, and state if overflow occurs.
    Answer10010001 (90+55=145); no overflow because 145 ≤ 255.
  5. Represent -75 in 8-bit two's complement binary.
    Answer+75 = 01001011; invert to 10110100 and add 1 to obtain 10110101 (-128+53 = -75).
  6. Convert 8-bit two's complement 11100110 to decimal.
    Answer-128+64+32+4+2 = -26.
  7. Apply a logical left shift by 3 places to 00010101 (21) and state the arithmetic effect.
    Answer10101000 (168); multiplies 21 by 23 (= 8) to give 168.
  8. Calculate the uncompressed size in KiB of a 640×512 pixel image at 8-bit colour depth (using 1,024 bytes/KiB).
    Answer640×512×8 = 2,621,440 bits = 327,680 bytes; 327,680÷1,024 = 320 KiB.

Questions students ask

Why do computers use binary instead of decimal internally?
Digital hardware processes data with logic gates and registers that distinguish two reliable voltage states, 0 and 1. Using ten distinct voltage levels across millions of circuits would cause noise and errors.
Why do programmers prefer hexadecimal when reading binary data?
Each hexadecimal digit maps cleanly to four binary bits, compressing a 16-bit string into four symbols. Hexadecimal is shorter to write and less error-prone than long strings of 0s and 1s.
Why is two's complement preferred over sign-magnitude for signed integers?
Sign-magnitude creates two encodings for zero (+0 and -0) and needs extra addition steps. Two's complement gives a single zero, reaches -128 in 8 bits, and subtracts via binary addition.
What is the difference between ASCII, ISCII and Unicode?
ASCII encodes basic English letters, digits and control codes, whereas ISCII encodes Indian scripts alongside ASCII. Unicode (including UTF-8 and UTF-32) provides unique code points across global languages and emojis.
What is the difference between KB/MB and KiB/MiB in file size questions?
Cambridge IGCSE Computer Science (0478) uses IEC binary prefixes (KiB, MiB, GiB) with exact 1,024 steps rather than 1,000. CBSE Class XI lists KB, MB, GB, TB and PB as memory units.
Which boards cover octal and floating-point encodings?
CBSE Class XI Computer Science (083) and ISC Class XI Computer Science (868) cover octal conversions, but only ISC covers mantissa-exponent floating-point representation. Cambridge IGCSE 0478 omits both octal and floating point, though it includes 8-bit two's complement.

Practise it

Take the Number Systems and Data Representation quiz first, browse all tests on the Reportcards quizzes page, view our tuition programmes, or book a free demo class in Jaipur or online.

Topics for Classes 1 to 8

Shorter guides for younger students, each with examples, practice questions and answers.

Related guides

Written by the Reportcards mentor team. Updated 18 November 2026.

Personal academic mentorship

Personal computer science mentorship in small batches

In Adarsh Nagar, Jaipur, and live online, KG to Class 12 students learn in batches of about six with one mentor. Founder Dr. Vishruti Arora brings 20+ years of mentoring across CBSE, ICSE/ISC, Cambridge IGCSE and IB.

WhatsApp +91 97835 96795. We reply within one working day.

MentorshipKG to Class 12

  • Small batches of about six with one mentor
  • 704, Frontier Colony, Jaipur, or live online
  • Classes Monday to Saturday, 3pm to 10pm