Computer Number System Notes for Competitive Exams
Komal Gupta
UPSC Exam Expert & Content Editor
In this note
- 1.Quick Facts at a Glance
- 2.1. Understanding Place Value
- 3.2. Converting Any Base to Decimal
- 4.3. Converting Decimal to Another Base
- 5.4. Shortcut Conversions Through Binary
- 6.5. Binary Arithmetic
- 7.6. Codes Used to Represent Characters
- 8.7. Quick Reference Table (0 to 15)
- 9.8. Why Computers Use Binary
- 10.9. Practice Questions
- 11.Exam Strategy
- 12.Related Notes
- 13.Frequently Asked Questions
PDF Notes: Computer Number System Notes for Competitive Exams
Premium PDF · one-time payment of ₹5 · instant access
Computers do not understand our familiar decimal digits directly. Inside a computer, every piece of data, whether a number, a letter, a picture or a song, is stored as a pattern of 0s and 1s. This is the binary number system. To make long binary numbers easier for humans to read, programmers also use octal and hexadecimal systems. Questions on number system conversions are a favourite in the computer awareness sections of bank PO and clerk, SBI, RBI Assistant, insurance, SSC and state exams, as well as in technical recruitment tests. The good news is that every conversion follows a fixed method that you can master in a few hours of practice. This note explains the four systems, gives step-by-step conversion methods with worked examples and covers binary arithmetic and character codes.
Quick Facts at a Glance
| System | Base | Digits used | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 10112 |
| Octal | 8 | 0 to 7 | 178 |
| Decimal | 10 | 0 to 9 | 5910 |
| Hexadecimal | 16 | 0 to 9 and A to F | 3F16 |
- In hexadecimal, A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
- One octal digit = 3 binary bits; one hexadecimal digit = 4 binary bits.
- The base (or radix) of a number system is the number of distinct digits it uses.
1. Understanding Place Value
In any number system, each position has a value equal to the base raised to a power. In decimal, 347 means 3 × 102 + 4 × 101 + 7 × 100 = 300 + 40 + 7. Binary works the same way, but with powers of 2. So 10112 = 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20 = 8 + 0 + 2 + 1 = 11. Remembering the powers of 2 makes binary questions much faster: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024.
2. Converting Any Base to Decimal
Method: Multiply each digit by its place value (base raised to the position, starting from 0 on the right) and add the results.
- Binary to decimal: 1101012 = 32 + 16 + 0 + 4 + 0 + 1 = 53.
- Octal to decimal: 1578 = 1 × 64 + 5 × 8 + 7 × 1 = 64 + 40 + 7 = 111.
- Hexadecimal to decimal: 2F16 = 2 × 16 + 15 × 1 = 32 + 15 = 47.
3. Converting Decimal to Another Base
Method (repeated division): Divide the decimal number by the new base repeatedly, writing down the remainders. Stop when the quotient becomes 0. Then read the remainders from bottom to top.
Decimal 25 to binary:
- 25 ÷ 2 = 12, remainder 1
- 12 ÷ 2 = 6, remainder 0
- 6 ÷ 2 = 3, remainder 0
- 3 ÷ 2 = 1, remainder 1
- 1 ÷ 2 = 0, remainder 1
Reading upward: 2510 = 110012. Check: 16 + 8 + 1 = 25.
Decimal 100 to octal: 100 ÷ 8 = 12 r 4; 12 ÷ 8 = 1 r 4; 1 ÷ 8 = 0 r 1. So 10010 = 1448.
Decimal 250 to hexadecimal: 250 ÷ 16 = 15 r 10 (A); 15 ÷ 16 = 0 r 15 (F). So 25010 = FA16.
Decimal Fractions to Binary
For the fractional part, multiply by 2 repeatedly and record the integer parts from top to bottom. Example: 0.625 × 2 = 1.25 (1), 0.25 × 2 = 0.5 (0), 0.5 × 2 = 1.0 (1). So 0.62510 = 0.1012.
4. Shortcut Conversions Through Binary
Binary to Octal and Back
Group binary digits in sets of three from the right (add leading zeros if needed) and replace each group with its octal digit.
Example: 1011102 → 101 | 110 → 5 | 6 → 568. To reverse, write each octal digit as 3 bits: 728 → 111 | 010 → 1110102.
Binary to Hexadecimal and Back
Group binary digits in sets of four from the right and replace each with a hex digit.
Example: 110101112 → 1101 | 0111 → D | 7 → D716. To reverse, write each hex digit as 4 bits: 3A16 → 0011 | 1010 → 1110102.
Octal to Hexadecimal
Convert octal to binary (3 bits per digit), then regroup in fours to get hexadecimal. Example: 658 → 110 101 → 110101 → 0011 0101 → 3516.
5. Binary Arithmetic
Binary Addition Rules
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 10 (write 0, carry 1)
- 1 + 1 + 1 = 11 (write 1, carry 1)
Example: 1011 + 0110 = 10001 (11 + 6 = 17).
Binary Subtraction
Rules: 0 − 0 = 0; 1 − 0 = 1; 1 − 1 = 0; 0 − 1 = 1 with a borrow of 1 from the next higher bit. Computers usually perform subtraction by adding the 2's complement.
1's and 2's Complement
- 1's complement: Flip every bit (0 becomes 1 and 1 becomes 0). 1's complement of 1010 is 0101.
- 2's complement: Add 1 to the 1's complement. 2's complement of 1010 is 0101 + 1 = 0110.
- 2's complement is used to represent negative numbers in computers.
6. Codes Used to Represent Characters
- BCD (Binary Coded Decimal): Each decimal digit is written as a 4-bit binary number. 59 in BCD = 0101 1001.
- ASCII (American Standard Code for Information Interchange): A 7-bit code representing 128 characters; extended ASCII uses 8 bits for 256 characters. In ASCII, 'A' = 65 and 'a' = 97.
- EBCDIC (Extended Binary Coded Decimal Interchange Code): An 8-bit code used mainly on IBM mainframes.
- Unicode: A universal standard that can represent characters from almost all writing systems, including Hindi (Devanagari), Tamil, Bengali and emojis. UTF-8 is its most common encoding on the web.
7. Quick Reference Table (0 to 15)
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Memorising this table removes most of the effort from octal and hexadecimal conversions, because every longer conversion is just a repeated use of these sixteen patterns.
8. Why Computers Use Binary
Electronic circuits can reliably detect two states: current on or off, high voltage or low voltage, magnetised in one direction or the other. Representing data with just two states makes circuits simpler, cheaper and less error-prone than trying to distinguish ten different voltage levels for decimal digits. Hexadecimal is popular with programmers because it compresses long binary strings: a 32-bit address such as 11000000101010000000000100000001 becomes the much shorter C0A80101 in hex. You will see hexadecimal in colour codes on websites (for example, #FF0000 is pure red), in memory addresses and in MAC addresses of network devices.
9. Practice Questions
- Convert 4510 to binary. Answer: 101101.
- Convert 111100002 to hexadecimal. Answer: F0.
- Convert 778 to decimal. Answer: 63.
- Find the 2's complement of 0111. Answer: 1001.
- What is the largest number that can be stored in 8 bits (unsigned)? Answer: 255 (11111111).
Exam Strategy
In the exam, first check whether the conversion can go through binary, because grouping bits in threes or fours is faster than repeated division. When converting to decimal, write the powers of the base above each digit before multiplying. Always verify your answer by converting it back; this takes ten seconds and catches most mistakes. Questions that ask "which of the following is the largest number" in mixed bases are easiest when you convert every option to decimal.
Finally, learn the powers of 2 up to 210 = 1024 by heart, because nearly every binary question depends on them.
Related Notes
- Computer Basics: Hardware and Software
- Computer Abbreviations and Full Forms
- Number System Notes (Quantitative Aptitude)
- All Computer Knowledge Notes
Frequently Asked Questions
What is the base of the binary number system?
The base is 2, and it uses only the digits 0 and 1.
What is the base of the hexadecimal system?
The base is 16, using digits 0 to 9 and letters A to F.
How do you convert decimal to binary?
Divide the number by 2 repeatedly, note the remainders and read them from bottom to top.
How do you convert binary to decimal?
Multiply each bit by its power of 2 and add the results.
What is 1010 in decimal?
1010 in binary equals 10 in decimal.
How many bits represent one hexadecimal digit?
Four bits.
How many bits represent one octal digit?
Three bits.
What is the 2's complement of a binary number?
It is the 1's complement (all bits flipped) plus 1, used to represent negative numbers.
What is 1 + 1 in binary?
10, meaning 0 with a carry of 1.
What is the ASCII value of capital A?
65.
What is the difference between ASCII and Unicode?
ASCII represents 128 basic characters, while Unicode can represent characters from almost all languages of the world.
What does F represent in hexadecimal?
F represents the decimal value 15.
Previous chapter
Input and Output Devices of Computer
Next chapter
Logic Gates and Boolean Algebra Notes
Komal Gupta
UPSC Exam Expert & Content Editor
Komal is a senior UPSC exam strategist with 8+ years of experience helping aspirants crack CSE, CDS and NDA exams. She writes in-depth notification breakdowns, exam pattern guides and preparation strategies.