0% found this document useful (0 votes)
4 views9 pages

Class 11 Number System Notes

The document provides an overview of number systems used in computing, including binary, octal, decimal, and hexadecimal systems, detailing their bases and symbols. It explains the conversion methods between these systems, including examples for converting decimal numbers to binary, octal, and hexadecimal, as well as vice versa. Additionally, it covers the representation of binary numbers in octal and hexadecimal formats and vice versa.

Uploaded by

mayankdubey1028
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views9 pages

Class 11 Number System Notes

The document provides an overview of number systems used in computing, including binary, octal, decimal, and hexadecimal systems, detailing their bases and symbols. It explains the conversion methods between these systems, including examples for converting decimal numbers to binary, octal, and hexadecimal, as well as vice versa. Additionally, it covers the representation of binary numbers in octal and hexadecimal formats and vice versa.

Uploaded by

mayankdubey1028
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 11 Number System Notes

Computer Science / Informatics Practices — Chapter 2 Handout

Introduction
A number system is a method to represent (write) numbers. Every number system has a set of unique characters or
literals. The count of these literals is called the radix or base of the number system. The four different number systems
used in the context of computers are given below:
Name of Number System Base Digits / Symbols Included
Binary Number System 2 0, 1
Octal Number System 8 0, 1, 2, 3, 4, 5, 6, 7
Decimal Number System 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Hexadecimal Number System 16 0 - 9 and A - F

1. Decimal Number System


The decimal number system is used in our day-to-day life. It is known as the base-10 system since 10 digits (0 to 9) are
used. A number is represented by two values — its symbol value (any digit from 0 to 9) and its positional value (in
terms of the base value).
Integer and fractional part of the decimal number 237.25, with positional values:
Digit 2 3 7 . 2 5
Position Number 2 1 0 -1 -2

Positional Value 102 101 100 10-1 10-2

Add the product of positional value and corresponding digit to get the decimal number:
2×102 + 3×101 + 7×100 + 2×10-1 + 5×10-2 = 237.25

2. Binary Number System


The ICs (Integrated Circuits) in a computer are made up of a large number of transistors which are activated by
electronic signals (low/high) they receive. The ON/high and OFF/low state of a transistor is represented using the two
digits 1 and 0, respectively. These two digits form the binary number system.
This system is also referred to as the base-2 system as it has only two digits. Some examples of binary numbers are
101011, 110001, 1010.101
Binary value for digits (0–9) of the decimal number system:
Decimal 0 1 2 3 4 5 6 7 8 9
Binary 0 1 10 11 100 101 110 111 1000 1001

3. Octal Number System


The octal number system was devised for compact representation of binary numbers. It is called the base-8 system as it
has eight digits in total (0-7). Three binary digits (8 = 23) are sufficient to represent any octal digit.
Decimal and 3-bit binary equivalent of the 8 octal digits. Examples of octal numbers: (145)8, (245)8, (235)8.
Octal Digit Decimal Value 3-bit Binary Number
0 0 000
1 1 001
2 2 010
3 3 011
4 4 100
5 5 101
6 6 110
7 7 111

4. Hexadecimal Number System


Hexadecimal numbers are also used for the compact representation of binary numbers. It consists of 16 unique symbols
(0-9, A-F) and is called the base-16 system. Four binary digits (16 = 24) are sufficient to represent any hexadecimal
digit. Decimal numbers 10 through 15 are represented by the letters A through F. Examples: (43A)16, (1B)16.
Hex Dec 4-bit Binary
0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111
Applications of the Hexadecimal Number System
1. To access a 16-bit memory address, a programmer has to use 16 binary bits, which is difficult to work with. To
simplify the address representation, hexadecimal and octal numbers are used. For a 16-bit memory address
1100000011110001, the hexadecimal notation maps it to "C0F1", which is much easier to remember.
2. Hexadecimal numbers are also used to describe colours on a webpage. Colour codes are written in hexadecimal form
for compact representation. For example, the 24-bit code for RED colour is 11111111,00000000,00000000. The
equivalent hexadecimal notation is (FF,00,00), which is easy to remember and use.

Conversion Between Number Systems


The decimal number system is most commonly used by humans, but digital systems understand binary numbers; octal
and hexadecimal number systems are used to simplify binary representation.

1. Conversion from Decimal to Other Number Systems


Steps to convert a decimal number to any other number system (binary, octal or hexadecimal), base value b:
1. Divide the given number by the base value (b) of the number system to convert into
2. Note the remainder
3. Keep dividing the quotient by the base value and note the remainder till the quotient is zero
4. Write the noted remainders in reverse order (from bottom to top)

A. Decimal to Binary Conversion


Example 1: Convert (122)10 to binary. Repeatedly divide by 2, recording remainders, until the quotient becomes 0; read
remainders bottom to top.
Example 2: Convert (145)10 to binary number.
Quotient Remainder
145/2 72 1
72/2 36 0
36/2 18 0
18/2 9 0
9/2 4 1
4/2 2 0
2/2 1 0
1/2 0 1
(145)10 = 10010001 (write remainders bottom to top)
Example 3: Convert (218)10 to binary number.
Quotient Remainder
218/2 109 0
109/2 54 1
54/2 27 0
27/2 13 1
13/2 6 1
6/2 3 0
3/2 1 1
1/2 0 1
(218)10 = 11011010

Practice Q1. Express the following decimal numbers as binary numbers:


(i) 715 (ii) 625 (iii) 660 (iv) 548 (v) 268 [all base 10]

B. Decimal to Octal Conversion


Base value of octal is 8; the decimal number is repeatedly divided by 8 to obtain its equivalent octal number.
Example 4: Convert (122)10 to Octal number.
Quotient Remainder
122/8 15 2
15/8 1 7
1/8 0 1
(122)10 = (172)8
Example 5: Convert (278)10 to Octal number.
Quotient Remainder
278/8 34 6
34/8 4 2
4/8 0 4
(278)10 = (426)8
Example 6: Convert (328)10 to Octal number.
Quotient Remainder
328/8 41 0
41/8 5 1
5/8 0 5
(328)10 = (510)8

Practice Q2. Express the following decimal numbers as octal numbers:


(i) 269 (ii) 780 (iii) 590 (iv) 400 (v) 983 [all base 10]

C. Decimal to Hexadecimal Conversion


Base value of hexadecimal is 16; the decimal number is repeatedly divided by 16 to obtain its equivalent hexadecimal
number.
Example 7: Convert (785)10 to Hexadecimal number.
Quotient Remainder
785/16 49 1
49/16 3 1
3/16 0 3
(785)10 = (311)16
Example 8: Convert (485)10 to Hexadecimal number.
Quotient Remainder
485/16 30 5
30/16 1 14
1/16 0 1
(485)10 = (1E5)16 (10-15 are represented by letters A-F respectively)

Practice Q3. Express the following decimal numbers as hexadecimal numbers:


(i) 970 (ii) 520 (iii) 750 (iv) 350 (v) 820 [all base 10]
Conversion From Other Number Systems to Decimal
Steps to convert a number with base value b to its decimal equivalent (b = 2, 8, or 16 for binary, octal, hexadecimal
respectively):
1. Write the position number for each alphanumeric symbol in the given number.
2. Get the positional value for each symbol by raising the base value b to its position number.
3. Multiply each digit with its respective positional value to get a decimal value.
4. Add all these decimal values to get the equivalent decimal number.

A. Binary Number to Decimal Number


Example 9: Convert (1101)2 into a decimal number.
Digit 1 1 0 1
Position Number 3 2 1 0
Position Value 23 22 21 20
Value 1×8=8 1×4=4 0×2=0 1×1=1
(1101)2 = 8 + 4 + 0 + 1 = (13)10
Example 10: Convert (1011010)2 into a decimal number.
(1011010)2 = 64 + 0 + 16 + 8 + 0 + 2 + 0 = (90)10
Example 11: Convert (1000111)2 into a decimal number.
(1000111)2 = 64 + 0 + 0 + 0 + 4 + 2 + 1 = (71)10
Example 12: Convert (11110101)2 into a decimal number.
(11110101)2 = 128 + 64 + 32 + 16 + 0 + 4 + 0 + 1 = (245)10

B. Octal Number to Decimal Number


Example 13: Convert (173)8 into a decimal number.
Digit 1 7 3
Position Number 2 1 0
Position Value 82 81 80
Value 1×64=64 7×8=56 3×1=3
(173)8 = 64 + 56 + 3 = (123)10
Example 14: Convert (350)8 into a decimal number.
(350)8 = 192 + 40 + 0 = (232)10
Example 15: Convert (725)8 into a decimal number.
(725)8 = 448 + 16 + 5 = (469)10

C. Hexadecimal Number to Decimal Number


Example 16: Convert (3A5)16 into a decimal number.
Digit 3 A 5
Position Number 2 1 0
Position Value 162 161 160
Value 3×256=768 10×16=160 5×1=5
(3A5)16 = 768 + 160 + 5 = (933)10
Example 17: Convert (2B)16 into a decimal number.
(2B)16 = 32 + 11 = (43)10
Example 18: Convert (97)16 into a decimal number.
(97)16 = 144 + 7 = (151)10
Q1. Why are 3 bits in a binary number grouped together to get an octal number?
Note: The base value of the octal system is 8. Since 8 = 2³, three binary digits are sufficient to represent all 8 octal digits.
Conversion Between Binary and Octal / Hexadecimal
A binary number is converted to an octal or hexadecimal number by making groups of 3 and 4 bits, respectively, and
replacing each group with its equivalent octal/hexadecimal digit.

A. Binary Number to Octal Number


Example 19: Convert (10101100)2 to an octal number. Group into 3 bits from right to left:
010 - 101 - 100 → 2 - 5 - 4
(10101100)2 = (254)8
Note: If the number of bits is not a multiple of 3, add the required number of 0s on the most significant position.

Example 20: Convert (111101010)2 to an octal number.


111 - 101 - 010 → 7 - 5 - 2
(111101010)2 = (752)8

B. Octal Number to Binary Number


Each octal digit is replaced by a group of three binary digits.
Example 21: Convert (705)8 to a binary number.
7 - 0 - 5 → 111 - 000 - 101
(705)8 = (111000101)2
Example 22: Convert (134)8 to a binary number.
1 - 3 - 4 → 001 - 011 - 100
(134)8 = (001011100)2

C. Binary Number to Hexadecimal Number


Group binary digits into 4 bits from right to left, replacing each group with its hexadecimal symbol.
Example 23: Convert (0110101100)2 to hexadecimal.
0001 - 1010 - 1100 → 1 - A - C
(0110101100)2 = (1AC)16
Example 24: Convert (110100110101)2 to hexadecimal.
1101 - 0011 - 0101 → D - 3 - 5
(110100110101)2 = (D35)16

D. Hexadecimal Number to Binary Number


Each hexadecimal digit is replaced by its 4-bit binary equivalent.
Example 25: Convert (23D)16 to binary.
2 - 3 - D → 0010 - 0011 - 1101
(23D)16 = (001000111101)2
Example 26: Convert (F018)16 to binary.
F - 0 - 1 - 8 → 1111 - 0000 - 0001 - 1000
(F018)16 = (1111000000011000)2
Example 27: Convert (172)16 to binary.
1 - 7 - 2 → 0001 - 0111 - 0010
(172)16 = (000101110010)2
Conversion of Numbers with a Fractional Part
A. Decimal Fraction to Another Number System
Repeatedly multiply the fractional part by the base value b until it becomes 0. Write the integer part from top to bottom
to get the equivalent number.
Example 28: Convert (0.25)10 to binary.
0.25 × 2 = 0.50 → 0
0.50 × 2 = 1.00 → 1
(0.25)10 = (0.01)2
Note: If the fractional part does not become 0, stop after about 10 multiplications, or when the fraction starts repeating.

Example 29: Convert (0.675)10 to binary.


0.675 × 2 = 1.350 → 1
0.350 × 2 = 0.700 → 0
0.700 × 2 = 1.400 → 1
0.400 × 2 = 0.800 → 0
0.800 × 2 = 1.600 → 1
0.600 × 2 = 1.200 → 1
0.200 × 2 = 0.400 → 0 (repeats — stop here)
(0.675)10 = (0.1010110)2
Example 30: Convert (0.675)10 to Octal.
0.675 × 8 = 5.400 → 5
0.400 × 8 = 3.200 → 3
0.200 × 8 = 1.600 → 1
0.600 × 8 = 4.800 → 4
0.800 × 8 = 6.400 → 6 (repeats — stop here)
(0.675)10 = (0.53146)8
Example 31: Convert (0.70)10 to Octal.
0.70 × 8 = 5.60 → 5
0.60 × 8 = 4.80 → 4
0.80 × 8 = 6.40 → 6
0.40 × 8 = 3.20 → 3
0.20 × 8 = 1.60 → 1
(0.70)10 = (0.54631)8
Example 32: Convert (0.675)10 to Hexadecimal.
0.675 × 16 = 10.800 → A (10)
0.800 × 16 = 12.800 → C (12) (repeats — stop here)
(0.675)10 = ([Link])16

B. Non-Decimal Fraction to Decimal Number System


Example 33: Convert (100101.101)2 into decimal.
Digit 1 0 0 1 0 1 . 1 0 1
Power 25 24 23 22 21 20 2-1 2-2 2-3

Value 32 0 0 4 0 1 .5 0 .125
(100101.101)2 = (37.625)10
Example 34: Convert (605.12)8 into a decimal number.
Digit 6 0 5 . 1 2
Power 82 81 80 8-1 8-2

Value 384 0 5 0.125 0.03125


(605.12)8 = (389.15625)10

C. Fractional Binary Number to Octal or Hexadecimal


Make groups of 3 bits (for octal) or 4 bits (for hexadecimal): from right to left for the integer part, and from left to right
for the fractional part. Substitute each group with its equivalent digit/symbol.
Example 35: Convert (10101100.01011)2 to octal.
010-101-100 . 010-110 → 2-5-4 . 2-6
(10101100.01011)2 = (254.23)8
Example 36: Convert (10101100.010111)2 to Hexadecimal.
1010-1100 . 0101-1100 → A-C . 5-C
(10101100.010111)2 = (AC.5C)16

You might also like