Data Representation: Bits, Bytes, ASCII, Unicode and Number Conversions for SSC
Rahul Kumar
SSC Exam Expert & Content Editor
In this note
PDF Notes: Data Representation: Bits, Bytes, ASCII, Unicode and Number Conversions for SSC
Premium PDF · one-time payment of ₹5 · instant access
A computer understands only two states, 0 and 1. Everything it stores, from a number to a letter or a picture, must be turned into a pattern of these bits. This is called data representation. This note explains the units of data, the common character codes (ASCII, Unicode, EBCDIC), conversions between number systems with solved examples, practice questions and FAQs.
Units of Data
| Unit | Size |
|---|---|
| Bit | A single binary digit, 0 or 1 |
| Nibble | 4 bits |
| Byte | 8 bits |
| Kilobyte (KB) | 1024 bytes |
| Megabyte (MB) | 1024 KB |
| Gigabyte (GB) | 1024 MB |
| Terabyte (TB) | 1024 GB |
| Petabyte (PB) | 1024 TB |
Number Systems
| System | Base | Digits used |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0 to 7 |
| Decimal | 10 | 0 to 9 |
| Hexadecimal | 16 | 0 to 9 and A to F (A = 10, B = 11, C = 12, D = 13, E = 14, F = 15) |
Character Codes
| Code | Details |
|---|---|
| ASCII | American Standard Code for Information Interchange. A 7-bit code with 128 characters (extended ASCII uses 8 bits and has 256). |
| EBCDIC | Extended Binary Coded Decimal Interchange Code, an 8-bit code used on IBM mainframes (256 characters). |
| Unicode | A universal standard that gives a code to the characters of almost all languages. It is used through UTF-8, UTF-16 and UTF-32. |
| BCD | Binary Coded Decimal: each decimal digit is stored in 4 bits. |
| Gray code | A binary code where two consecutive values differ in only one bit. |
| ASCII Range | Characters |
|---|---|
| 32 | Space |
| 48 to 57 | Digits 0 to 9 |
| 65 to 90 | Capital letters A to Z (A = 65) |
| 97 to 122 | Small letters a to z (a = 97) |
- The ASCII code of a small letter is 32 more than that of the capital letter. For example, A = 65 and a = 97.
- UTF-8 uses 1 to 4 bytes per character and is the most common encoding on the web.
- Unicode can represent more than a million code points, so it covers Hindi, Tamil, Arabic, Chinese and emoji too.
Conversions with Examples
Decimal to Binary (divide by 2 and read the remainders from bottom to top)
| Decimal | Binary |
|---|---|
| 5 | 101 |
| 10 | 1010 |
| 25 | 11001 |
| 45 | 101101 |
Binary to Decimal (multiply each digit by powers of 2)
| Binary | Working | Decimal |
|---|---|---|
| 1101 | 8 + 4 + 0 + 1 | 13 |
| 10110 | 16 + 0 + 4 + 2 + 0 | 22 |
| 111 | 4 + 2 + 1 | 7 |
Hexadecimal and Octal
| Conversion | Working | Result |
|---|---|---|
| Hex 2F to decimal | 2 × 16 + 15 | 47 |
| Hex A to decimal | 10 | 10 |
| Octal 17 to decimal | 1 × 8 + 7 | 15 |
| Binary 1111 to hex | Group of 4 bits = 15 | F |
| Binary 111 to octal | Group of 3 bits = 7 | 7 |
Complements and Negative Numbers
- 1’s complement: change every 0 to 1 and every 1 to 0. For 1010 it is 0101.
- 2’s complement: 1’s complement plus 1. For 1010 it is 0110.
- Computers use 2’s complement to store negative numbers and to subtract.
- In a signed number, the leftmost bit is the sign bit (0 means positive, 1 means negative).
Quick Facts
- 1 byte can store one character in ASCII.
- n bits can represent 2 raised to n different values. 8 bits give 256 values (0 to 255).
- Bits are used for data transfer speed (for example, Mbps) and bytes for storage size (for example, MB).
- Hexadecimal is used for colour codes, memory addresses and MAC addresses.
Quick Tips
- Remember A = 65, a = 97 and 0 = 48 for ASCII questions.
- To convert binary to hex, group the bits in fours from the right.
- n bits give 2^n values; this formula answers many questions.
- Storage uses bytes; speed uses bits.
Quick Revision Points
- 1 byte = 8 bits; 1 nibble = 4 bits.
- ASCII is 7-bit (128 characters); extended ASCII is 8-bit.
- Unicode supports all languages; UTF-8 is common on the web.
- Binary base 2, octal base 8, hexadecimal base 16.
- 2’s complement is used for negative numbers.
Practice Questions With Answers
- How many bits are there in one byte?
Answer: 8 - ASCII code of capital letter B?
Answer: 66 - How many bits does standard ASCII use?
Answer: 7 - Decimal value of binary 101?
Answer: 5 - How many bits are there in a nibble?
Answer: 4 - Decimal value of hexadecimal F?
Answer: 15 - What is the base of the octal system?
Answer: 8 - Which complement is used to represent negative numbers in computers?
Answer: 2’s complement - Which code supports almost all languages of the world?
Answer: Unicode - How many bytes are there in 1 KB?
Answer: 1024
How to Practise This Chapter
Practise 10 questions every day and write the steps on paper. Then attempt timed sets from our practice papers and the previous year papers page. See all topics on the Data Representation, ASCII and Unicode notes page.
Frequently Asked Questions
What is data representation?
It is the way a computer stores letters, numbers and other data as patterns of 0s and 1s.
What is a bit?
A bit is the smallest unit of data in a computer, either 0 or 1.
What is a byte?
A byte is a group of 8 bits.
What is ASCII?
ASCII is a 7-bit character code that gives a number to letters, digits and symbols.
What is the difference between ASCII and Unicode?
ASCII covers 128 (or 256 in the extended form) characters, mainly English. Unicode covers characters of almost all languages.
What is UTF-8?
It is a Unicode encoding that uses 1 to 4 bytes for each character.
How do I convert decimal to binary?
Divide the number by 2 repeatedly and write the remainders from bottom to top.
What is the hexadecimal system?
It is a base-16 system that uses the digits 0 to 9 and the letters A to F.
What is 2’s complement?
It is the 1’s complement plus 1, used for negative numbers.
What is EBCDIC?
An 8-bit character code used by IBM mainframe computers.
How many values can 8 bits represent?
256 values, from 0 to 255.
Is this topic asked in SSC exams?
Yes, questions on bits, bytes, ASCII and number conversions are common in SSC computer awareness.
Previous chapter
Artificial Intelligence Notes for SSC Exams: AI, Machine Learning and Generative AI
Next chapter
OSI Model and TCP/IP Model Notes for SSC Exams
Rahul Kumar
SSC Exam Expert & Content Editor
Rahul is a senior SSC exam strategist with 8+ years of experience helping aspirants crack CGL, CHSL and MTS exams. He writes in-depth notification breakdowns, exam pattern guides and preparation strategies.