πŸ’» πŸ”’ ⚑

Number Systems

Binary Β· Octal Β· Decimal Β· Hexadecimal Β· Complete Solutions

Jump to β†’ Theory E1–E4 F1 Decimal Convert F2 Binary Convert F3 Hex/Octal Convert F4 Binary Add F5 Binary Subtract
πŸ”‘ Quick Tricks
Decimal→Binary: 2 se divide karo
Decimal→Octal: 8 se divide karo
Decimal→Hex: 16 se divide karo
Binary→Decimal: 2 ki power multiply
Hex digits: 0-9, A=10, B=11, C=12, D=13, E=14, F=15
Answer the Following Questions πŸ“–
Binary
Base = 2
Digits: 0, 1
Octal
Base = 8
Digits: 0–7
Decimal
Base = 10
Digits: 0–9
Hexadecimal
Base = 16
Digits: 0–9, A–F
E1
What is a number system?
+
Answer A number system is a way of representing numbers using a set of symbols (called digits) and a base. It defines how we write, count, and do math with numbers.

πŸ’‘ Simple bolein toh: Number system ek language hai numbers ke liye. Jaise humans ke liye 0–9 use karte hain (decimal), waise computers ke liye sirf 0 aur 1 (binary).

E2
What is the base of a number system? Why is it important?
+
Answer The base (or radix) of a number system is the total count of unique digits used in that system.

Examples: Binary β†’ base 2 (uses 0,1) | Octal β†’ base 8 | Decimal β†’ base 10 | Hex β†’ base 16
Why Important? The base tells us the value of each digit's position. In decimal, positions are powers of 10 (ones, tens, hundreds). In binary, positions are powers of 2. Knowing the base is essential to convert between systems correctly.

πŸ’‘ Base = kitne digits available hain us system mein. Isse hi pata chalta hai har digit ki positional value kya hai!

E3
What does "hexadecimal" mean in the context of number systems?
+
Answer Hexadecimal means a number system with base 16. It uses 16 unique symbols: digits 0–9 and letters A, B, C, D, E, F (where A=10, B=11, C=12, D=13, E=14, F=15).
Why used in computers? Binary numbers are very long. Hexadecimal compresses them β€” 4 binary digits = 1 hex digit. So programmers use hex to represent binary data more compactly. Example: 1111 1111 in binary = FF in hex.

πŸ’‘ "Hexa" = 6, "Decimal" = 10, toh 6+10 = 16 digits! Hex mein A se F tak letters bhi digits ka kaam karte hain.

E4
Why do we need to convert a decimal number into binary?
+
Answer We convert decimal to binary because computers only understand binary (0 and 1). Every piece of data β€” text, images, audio β€” is stored and processed as binary inside a computer. The 0 represents OFF state and 1 represents ON state of electronic switches (transistors).

πŸ’‘ Computer ek electronic machine hai. Uske andar sirf 2 states hain: current ON (1) ya current OFF (0). Isliye sab kuch binary mein convert karna padta hai!

Decimal β†’ Octal, Hexadecimal, Binary πŸ”„
Method Yaad Karo Binary: Number ko 2 se baar baar divide karo, remainders ko ulta likhkar answer milta hai.
Octal: 8 se divide karo same tarike se.
Hex: 16 se divide karo. Agar remainder 10 hai toh A, 11β†’B, 12β†’C, 13β†’D, 14β†’E, 15β†’F.
Decimal Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16)
(12)₁₀110014C
(89)₁₀101100113159
(361)₁₀101101001551169
(671)₁₀1010011111123729F
(906)₁₀1110001010161238A
a
Detailed steps for (12)₁₀ β†’ Binary, Octal, Hex
+
Binary (Γ·2)
12 Γ· 2 = 6 R 0
6 Γ· 2 = 3 R 0
3 Γ· 2 = 1 R 1
1 Γ· 2 = 0 R 1
↑ Read up: 1100
Octal (Γ·8)
12 Γ· 8 = 1 R 4
1 Γ· 8 = 0 R 1
↑ Read up: 14
Hex (Γ·16)
12 Γ· 16 = 0 R 12
12 = C in hex
↑ Read up: C
βœ… (12)₁₀ = (1100)β‚‚ = (14)β‚ˆ = (C)₁₆
b
Detailed steps for (89)₁₀ β†’ Binary, Octal, Hex
+
Binary (Γ·2)
89 Γ· 2 = 44 R 1
44 Γ· 2 = 22 R 0
22 Γ· 2 = 11 R 0
11 Γ· 2 = 5 R 1
5 Γ· 2 = 2 R 0
2 Γ· 2 = 1 R 0
1 Γ· 2 = 0 R 1
↑ 1011001
Octal (Γ·8)
89 Γ· 8 = 11 R 1
11 Γ· 8 = 1 R 3
1 Γ· 8 = 0 R 1
↑ 131
Hex (Γ·16)
89 Γ· 16 = 5 R 9
5 Γ· 16 = 0 R 5
↑ 59
βœ… (89)₁₀ = (1011001)β‚‚ = (131)β‚ˆ = (59)₁₆
c
Detailed steps for (361)₁₀ β†’ Binary, Octal, Hex
+
Binary (Γ·2)
361Γ·2=180 R 1
180Γ·2=90 R 0
90Γ·2=45 R 0
45Γ·2=22 R 1
22Γ·2=11 R 0
11Γ·2=5 R 1
5Γ·2=2 R 1
2Γ·2=1 R 0
1Γ·2=0 R 1
↑ 101101001
Octal (Γ·8)
361Γ·8=45 R 1
45Γ·8=5 R 5
5Γ·8=0 R 5
↑ 551
Hex (Γ·16)
361Γ·16=22 R 9
22Γ·16=1 R 6
1Γ·16=0 R 1
↑ 169
βœ… (361)₁₀ = (101101001)β‚‚ = (551)β‚ˆ = (169)₁₆
d
Detailed steps for (671)₁₀ β†’ Binary, Octal, Hex
+
Binary (Γ·2)
671Γ·2=335 R 1
335Γ·2=167 R 1
167Γ·2=83 R 1
83Γ·2=41 R 1
41Γ·2=20 R 1
20Γ·2=10 R 0
10Γ·2=5 R 0
5Γ·2=2 R 1
2Γ·2=1 R 0
1Γ·2=0 R 1
↑ 1010011111
Octal (Γ·8)
671Γ·8=83 R 7
83Γ·8=10 R 3
10Γ·8=1 R 2
1Γ·8=0 R 1
↑ 1237
Hex (Γ·16)
671Γ·16=41 R 15=F
41Γ·16=2 R 9
2Γ·16=0 R 2
↑ 29F
βœ… (671)₁₀ = (1010011111)β‚‚ = (1237)β‚ˆ = (29F)₁₆
e
Detailed steps for (906)₁₀ β†’ Binary, Octal, Hex
+
Binary (Γ·2)
906Γ·2=453 R 0
453Γ·2=226 R 1
226Γ·2=113 R 0
113Γ·2=56 R 1
56Γ·2=28 R 0
28Γ·2=14 R 0
14Γ·2=7 R 0
7Γ·2=3 R 1
3Γ·2=1 R 1
1Γ·2=0 R 1
↑ 1110001010
Octal (Γ·8)
906Γ·8=113 R 2
113Γ·8=14 R 1
14Γ·8=1 R 6
1Γ·8=0 R 1
↑ 1612
Hex (Γ·16)
906Γ·16=56 R 10=A
56Γ·16=3 R 8
3Γ·16=0 R 3
↑ 38A
βœ… (906)₁₀ = (1110001010)β‚‚ = (1612)β‚ˆ = (38A)₁₆
Binary β†’ Decimal, Octal, Hexadecimal πŸ”„
Method β€” Binary to Decimal Har bit ko uski position ki power of 2 se multiply karo (right se start: 2⁰, 2ΒΉ, 2Β², ...) aur sab add karo.
Then: Decimal milne ke baad, usse 8 ya 16 se divide karke Octal/Hex nikalo.
Binary Decimal (Base 10) Octal (Base 8) Hexadecimal (Base 16)
(11)β‚‚333
(110)β‚‚666
(100011)β‚‚354323
(111010)β‚‚58723A
(10001001)β‚‚13721189
?
Click to see detailed step-by-step for all F2 parts
+
11
110
100011
111010
10001001
  • (11)β‚‚ β†’ Decimal: 1Γ—2ΒΉ + 1Γ—2⁰ = 2 + 1 = 3
  • 3 β†’ Octal: 3Γ·8 = 0 R 3 β†’ (3)β‚ˆ
  • 3 β†’ Hex: 3Γ·16 = 0 R 3 β†’ (3)₁₆
βœ… (11)β‚‚ = (3)₁₀ = (3)β‚ˆ = (3)₁₆
  • (110)β‚‚ β†’ Decimal: 1Γ—2Β² + 1Γ—2ΒΉ + 0Γ—2⁰ = 4+2+0 = 6
  • 6 β†’ Octal: 6Γ·8 = 0 R 6 β†’ (6)β‚ˆ
  • 6 β†’ Hex: 6Γ·16 = 0 R 6 β†’ (6)₁₆
βœ… (110)β‚‚ = (6)₁₀ = (6)β‚ˆ = (6)₁₆
  • (100011)β‚‚ β†’ Decimal:
    1Γ—2⁡ + 0Γ—2⁴ + 0Γ—2Β³ + 0Γ—2Β² + 1Γ—2ΒΉ + 1Γ—2⁰
    = 32 + 0 + 0 + 0 + 2 + 1 = 35
  • 35 β†’ Octal: 35Γ·8=4 R 3, 4Γ·8=0 R 4 β†’ read up: (43)β‚ˆ
  • 35 β†’ Hex: 35Γ·16=2 R 3, 2Γ·16=0 R 2 β†’ read up: (23)₁₆
βœ… (100011)β‚‚ = (35)₁₀ = (43)β‚ˆ = (23)₁₆
  • (111010)β‚‚ β†’ Decimal:
    1Γ—2⁡+1Γ—2⁴+1Γ—2Β³+0Γ—2Β²+1Γ—2ΒΉ+0Γ—2⁰
    = 32+16+8+0+2+0 = 58
  • 58 β†’ Octal: 58Γ·8=7 R 2, 7Γ·8=0 R 7 β†’ (72)β‚ˆ
  • 58 β†’ Hex: 58Γ·16=3 R 10=A, 3Γ·16=0 R 3 β†’ (3A)₁₆
βœ… (111010)β‚‚ = (58)₁₀ = (72)β‚ˆ = (3A)₁₆
  • (10001001)β‚‚ β†’ Decimal:
    1Γ—2⁷+0Γ—2⁢+0Γ—2⁡+0Γ—2⁴+1Γ—2Β³+0Γ—2Β²+0Γ—2ΒΉ+1Γ—2⁰
    = 128+0+0+0+8+0+0+1 = 137
  • 137 β†’ Octal: 137Γ·8=17 R 1, 17Γ·8=2 R 1, 2Γ·8=0 R 2 β†’ (211)β‚ˆ
  • 137 β†’ Hex: 137Γ·16=8 R 9, 8Γ·16=0 R 8 β†’ (89)₁₆
βœ… (10001001)β‚‚ = (137)₁₀ = (211)β‚ˆ = (89)₁₆
Hex/Octal β†’ Decimal & Binary πŸ”„
Method Octalβ†’Decimal: Har digit Γ— 8 ki power (right se 8⁰, 8ΒΉ, 8Β²...) add karo.
Hex→Decimal: Har digit × 16 ki power. A=10, B=11, C=12, D=13, E=14, F=15.
β†’Binary: Decimal milne ke baad 2 se divide karo.
NumberDecimalBinary
(1B)₁₆2711011
(561)β‚ˆ369101110001
(717)β‚ˆ463111001111
(B28)₁₆2856101100101000
(D4E)₁₆3406110101001110
?
Click to see detailed steps for all F3 parts
+
1B
561β‚ˆ
717β‚ˆ
B28
D4E
  • (1B)₁₆ β†’ Decimal: B=11
    1Γ—16ΒΉ + 11Γ—16⁰ = 16 + 11 = 27
  • 27 β†’ Binary: 27Γ·2=13 R 1, 13Γ·2=6 R 1, 6Γ·2=3 R 0, 3Γ·2=1 R 1, 1Γ·2=0 R 1
    Read up: 11011
βœ… (1B)₁₆ = (27)₁₀ = (11011)β‚‚
  • (561)β‚ˆ β†’ Decimal:
    5Γ—8Β²+6Γ—8ΒΉ+1Γ—8⁰ = 5Γ—64+6Γ—8+1 = 320+48+1 = 369
  • 369 β†’ Binary: 369Γ·2=184 R1, 184Γ·2=92 R0, 92Γ·2=46 R0, 46Γ·2=23 R0, 23Γ·2=11 R1, 11Γ·2=5 R1, 5Γ·2=2 R1, 2Γ·2=1 R0, 1Γ·2=0 R1
    Read up: 101110001
βœ… (561)β‚ˆ = (369)₁₀ = (101110001)β‚‚
  • (717)β‚ˆ β†’ Decimal:
    7Γ—8Β²+1Γ—8ΒΉ+7Γ—8⁰ = 7Γ—64+8+7 = 448+8+7 = 463
  • 463 β†’ Binary: 463Γ·2=231 R1, 231Γ·2=115 R1, 115Γ·2=57 R1, 57Γ·2=28 R1, 28Γ·2=14 R0, 14Γ·2=7 R0, 7Γ·2=3 R1, 3Γ·2=1 R1, 1Γ·2=0 R1
    Read up: 111001111
βœ… (717)β‚ˆ = (463)₁₀ = (111001111)β‚‚
  • (B28)₁₆ β†’ Decimal: B=11
    11Γ—16Β²+2Γ—16ΒΉ+8Γ—16⁰ = 11Γ—256+32+8 = 2816+32+8 = 2856
  • 2856 β†’ Binary: Divide by 2 repeatedly:
    2856β†’1428 R0, 1428β†’714 R0, 714β†’357 R0, 357β†’178 R1, 178β†’89 R0, 89β†’44 R1, 44β†’22 R0, 22β†’11 R0, 11β†’5 R1, 5β†’2 R1, 2β†’1 R0, 1β†’0 R1
    Read up: 101100101000
βœ… (B28)₁₆ = (2856)₁₀ = (101100101000)β‚‚
  • (D4E)₁₆ β†’ Decimal: D=13, E=14
    13Γ—16Β²+4Γ—16ΒΉ+14Γ—16⁰ = 13Γ—256+64+14 = 3328+64+14 = 3406
  • 3406 β†’ Binary: 3406β†’1703 R0, 1703β†’851 R1, 851β†’425 R1, 425β†’212 R1, 212β†’106 R0, 106β†’53 R0, 53β†’26 R1, 26β†’13 R0, 13β†’6 R1, 6β†’3 R0, 3β†’1 R1, 1β†’0 R1
    Read up: 110101001110
βœ… (D4E)₁₆ = (3406)₁₀ = (110101001110)β‚‚
Add Binary Numbers βž•
Binary Addition Rules β€” Yaad karo! 0+0 = 0  |  0+1 = 1  |  1+0 = 1  |  1+1 = 10 (write 0, carry 1)  |  1+1+1 = 11 (write 1, carry 1)
a
(101)β‚‚ + (110)β‚‚
+
Column Addition
  1 0 1
+ 1 1 0
1 0 1 1
Step by step
Col 1 (right): 1+0=1 βœ“
Col 2: 0+1=1 βœ“
Col 3: 1+1=10 β†’ write 0, carry 1
Col 4: carry 1 β†’ write 1
βœ… (101)β‚‚ + (110)β‚‚ = (1011)β‚‚

πŸ’‘ Decimal mein check karo: 5+6=11 aur (1011)β‚‚ = 11. Sahi hai! βœ“

b
(10101)β‚‚ + (1010)β‚‚
+
Column Addition
1 0 1 0 1
+ 0 1 0 1 0
1 1 1 1 1
Step by step
Col1: 1+0=1
Col2: 0+1=1
Col3: 1+0=1
Col4: 0+1=1
Col5: 1+0=1
βœ… (10101)β‚‚ + (1010)β‚‚ = (11111)β‚‚

πŸ’‘ Decimal check: 21+10=31, (11111)β‚‚=31 βœ“

c
(1110101)β‚‚ + (110110)β‚‚
+
Column Addition
carries: 1 1 1 1 0 0 0
 1 1 1 0 1 0 1
+ 0 1 1 0 1 1 0
1 0 1 0 1 0 1 1
Step by step
Col1: 1+0=1
Col2: 0+1=1, c=0
Col3: 1+1=10 β†’ write 0, carry 1
Col4: 0+0+c1=1
Col5: 1+1=10 β†’ write 0, carry 1
Col6: 1+1+c1=11 β†’ write 1, carry 1
Col7: 1+0+c1=10 β†’ write 0, carry 1
Col8: carry 1 β†’ 1
βœ… (1110101)β‚‚ + (110110)β‚‚ = (10101011)β‚‚

πŸ’‘ Decimal check: 117+54=171, (10101011)β‚‚=171 βœ“

Subtract Binary Numbers βž–
Binary Subtraction Rules β€” Yaad karo! 0βˆ’0 = 0  |  1βˆ’0 = 1  |  1βˆ’1 = 0  |  0βˆ’1 = borrow karo β†’ 10βˆ’1=1 (aur agle column se 1 minus ho jaata hai)
a
(110)β‚‚ βˆ’ (11)β‚‚   [Second minus First]
+
Subtraction
1 1 0
βˆ’ 0 1 1
0 1 1
Step by step
Col1: 0βˆ’1 β†’ borrow! 10βˆ’1=1, next col mein 1 minus
Col2: 1βˆ’1βˆ’1(borrow)=βˆ’1 β†’ borrow again! 11βˆ’1βˆ’1=1
Col3: 1βˆ’0βˆ’1(borrow)=0
βœ… (110)β‚‚ βˆ’ (11)β‚‚ = (11)β‚‚

πŸ’‘ Decimal check: 6βˆ’3=3 aur (11)β‚‚=3 βœ“

b
(10101)β‚‚ βˆ’ (1010)β‚‚   [Second minus First]
+
Subtraction
1 0 1 0 1
βˆ’ 0 1 0 1 0
0 1 0 1 1
Step by step
Col1: 1βˆ’0=1
Col2: 0βˆ’1 β†’ borrow! 10βˆ’1=1, nextβˆ’1
Col3: 1βˆ’0βˆ’1(borrow)=0
Col4: 0βˆ’1 β†’ borrow! 10βˆ’1=1, nextβˆ’1
Col5: 1βˆ’0βˆ’1(borrow)=0
βœ… (10101)β‚‚ βˆ’ (1010)β‚‚ = (1011)β‚‚

πŸ’‘ Decimal check: 21βˆ’10=11 aur (1011)β‚‚=11 βœ“

c
(1110101)β‚‚ βˆ’ (110110)β‚‚   [Second minus First]
+
Subtraction
1 1 1 0 1 0 1
βˆ’ 0 1 1 0 1 1 0
0 1 1 1 1 1 1
Step by step
Col1: 1βˆ’0=1
Col2: 0βˆ’1 β†’ borrow! 10βˆ’1=1, nextβˆ’1
Col3: 1βˆ’1βˆ’1=βˆ’1 β†’ borrow! 11βˆ’1βˆ’1=1, nextβˆ’1
Col4: 0βˆ’0βˆ’1=βˆ’1 β†’ borrow! 10βˆ’0βˆ’1=1, nextβˆ’1
Col5: 1βˆ’1βˆ’1=βˆ’1 β†’ borrow! 11βˆ’1βˆ’1=1, nextβˆ’1
Col6: 1βˆ’1βˆ’1=βˆ’1 β†’ borrow! 11βˆ’1βˆ’1=1, nextβˆ’1
Col7: 1βˆ’0βˆ’1=0
βœ… (1110101)β‚‚ βˆ’ (110110)β‚‚ = (111111)β‚‚

πŸ’‘ Decimal check: 117βˆ’54=63 aur (111111)β‚‚=63 βœ“