AmbifulWorksheets
Cheat sheet
CBSE · Class 11 · Computer Science

Encoding Schemes and Number System

How text is coded (ASCII, ISCII, Unicode) and how numbers are written in binary, octal, decimal and hexadecimal, with conversions including fractional parts.

Key ideas

Remember

ASCII codes'A' = 65, 'a' = 97, '0' = 48, space = 32
Hexadecimal digitsA = 10, B = 11, C = 12, D = 13, E = 14, F = 15
To decimal(157)8 = 1 × 64 + 5 × 8 + 7 = 111; (2F)16 = 2 × 16 + 15 = 47
Decimal to binary13 ÷ 2 gives remainders 1, 0, 1, 1; read upwards: (1101)2
Binary to octal and hex10111010 → 010 111 010 = (272)8; 1011 1010 = (BA)16
After the pointplaces 1/2, 1/4, 1/8: (101.11)2 = 5 + 1/2 + 1/4 = 5.75
Fraction to binary0.625 × 2 = 1.25 → 1; 0.25 × 2 = 0.5 → 0; 0.5 × 2 = 1.0 → 1: 0.101
Message size20 English letters + 10 Devanagari: UTF-8 20 + 30 = 50 bytes; UTF-32 120 bytes

Watch out

Worked example

Convert (10111100.101)2 into (a) decimal (b) octal (c) hexadecimal.

Working: 188 + 5/8; octal: groups of three on each side of the point; hexadecimal: groups of four, padding the fraction with a 0 (1010)

Answer: (a) 188.625; (b) 274.5; (c) BC.A