Marrys Class 7 Ch-1
Marrys Class 7 Ch-1
Encoding Schemes
#RoadMap
Discuss the concept of number system
List the different types of number system: Decimal, Binary, Octaland
Hexadecimal
Discuss conversion from Decimal to Binary, Octal and Hexadecimal number
system
Discuss conversion from Binary, Octaland Hexadecimal to Decimal number
system
Discuss encoding schemes
60
50 70
40 60
50
20
4 kg
20
10
OFF Calculate
0 1100*1100 10010000
In binary numbers, the bit farthest tothe left is called MSB (Most
#EYL Significant Bit) as it has the highest place value and the bit
farthest to the right is called LSB (Least Significant Bit) as it has
the lowest place value.
MSB LSB
1 1 1
For example,
RGB Color Code (in Decimal) RGB Color Code (in Hexadecimal)
Color Name
(00,00,00)
Black (0,0,0)
(FF,FF,FF)
White (255,255,255)
(FF,00,00)
Red (255,0,0)
#SnapCheck
statements.
Write "T' for true and 'F'for false
number system.
1. There are 2digits in the binary
2. 891 is a valid octal number.
100.
3. Base of decimal number system is
4. A1Cis a valid hexadecimal number.
numbers.
5. A computer can understand only binary
SYSTEMS
CONVERSION BETWEEN NUMBER
2 2
2 1
1 MSB
Thus,(65),, = (1000001),
Decimal to Octal
decimal
uses repeated division method. In this method, the
This conversion also is
the remainder is recorded. This process
number is repeatedly divided by 8 and by
reacha zero quotient. The result of the conversion is obtained
continuedtill we
bottom tothe top.
writing the remainders from the
equivalent in the octal number
system.
Example: Convert (298),, to its
8 298 Remainder
37 2
5
4
16 33
16 2 1
Binary to Decimal
Every bit in a binary number hasa positional value associated with it. The positional
value is in terms of increasing powers of 2starting with the extreme right or the
rightmost bit. The rightmost bit has a positional value of 2°. The digits are multiplied
with their positional values andthe products are added to get the decimal number.
Example 1:Convert (10011), to its equivalent in the decimal number system.
Binary Number 0 0 1 1
Positional Values 24 23 22 21 20
The bits are multiplied with positional values and the products are added.
=1x24 +0x23 +0x22+1x21 + 1 x 20
=1x 16 +0 x8 +0x4 +1x2+1x1
= 16 +0 +0+2 +1
= 19
Octal to Decimal
We have already learnt toconvert binary number to decimal number. The method
to convert octal number to decimal number remains the same. However, in octal
number system, the positional value is in terms of increasing powers of 8 starting with
the extreme right or the rightmost digit. The rightmost digit has a positional value of
8°, The digits are multiplied with their positional values and the products are added to
get the decimal number.
Example: Convert (157), to its equivalent in the decimal number.
Octal Number 5 7
Positional Value 82 81 80
=64 + 40 +7
= 111
#SnapCheck.
Perform the following conversions:
1. (342),, =(?), 2. (1101), =(?,0
3. (72), =(?),o 4. (213),, =(?),6
ENCODINGSCHEME
We know that computer understands only binary language, i.e., the language of
Os and 1s.
We have seen how to convert decimal numbers to binary numbers. But have you ever
Wondered what happens when we input characters? How are characters converted
into their equivalent binary form? Let us find out.
Every character on the keyboard hasa code associated with it. This code is called
the American Standard Code for Information Interchange or ASCIl code. Every time
we press any keyon the keyboard, the binary form of its ASCIl code is sent to the
computer.
Just like ASCII, there are other standard encoding schemes where each letter, numerat
and symbol is encoded or assigned a unique code.
Let us learn about some of the well-known encoding schemes.
American Standard Code for Information Interchange
(ASCII)
ASCIlis one of the most common encoding standard. Every ASCIlcode makes use of
7 bits. It is possible to have 128 unique codes in the ASCIlcharacter set.
Table 1.2: ASCIl code for some printable characters
Character Decimal ValueCharacter Decimal Value Character Decimal Value
Space 32 64 96
33 A 65 a 97
34 B 66 b 98
35 67 C 99
36 D 68 d 100
% 37 69 101
38 F 70 f 102
39 G 71 103
40 UI
H 72 104
41 73 i 105
Ifwe input the character A, then the binary equivalent of decimal value 65 (its ASCII
code), i.e., 1000001 is sent to the computer.
Unicode
Unicode is an internationally recognised encoding standard that assigns a unique
code to each letter, digit or symbol used in any language of the world. ASClI
represents only basic English characters whereas Unicode supports characters from
all languages around the world. Unicode is a superset of ASCII. The numeric codes
0-127 represent the same symbols in both ASCIland Unicode.
This standard is supported by most of the software and allows data to be exchanged
across different platforms, devices and applications.
Unicode can use 8 to 32 bits per character. Commonly used Unicode encodings are
UTF-8, UTF-16 and UTF-32.
Gottfried Leibniz, aGermnan mathematician, is credited with the
invention of the binary number systern.
we can use
When designing web page with HTML or CSS,
hexadecimal codes to represent the colors. These
codes are made
#IRL
# symbol.
upof 6 hexadecimal digits and are preceded by
For example,
#FFO000represents red.
#000000 represents black.
#FFFFFF represents white.
#THR(O)WBACK
Number system is a method of representing numbers.
Decimal and
There are four major types of number systems: Binary, Octal,
Hexadecimal.
ASCIl and Unicode are two widely used encoding standards.
#LetUs Tweet
A. Tick (V)the correct answer.
1. The octal decimal number (651), is equivalent to
a. (27B),, b. (28B),6 c. (28C),i6 d. (28A),6
2. The hexadecimal number (1E2),, is equivalent to
a. (480),0 b. (483),0 c. (482),, d. (484),0
3. The base in binary number system is
a. 2 b. 8 C. 10 d. 1
#DiY
Lab Activity
decimal number system.
1. Convert the following to their equivalent in
a. (247), =(?),0 b. (10110), =(?),o
c. (A2F),6 = (? )0 d. (10010), =(?0 11
equivalent in binary, octal and
2. Convert the following decimal numbers totheir
hexadecimal number system.
a. (431),, = (?), b. (567),, =(?),
c. (189),, = (?),6 d. (325),,= (?y
Project
(Hint: Convert each number to its decimal
Find the missing number inthe series.
equivalent to complete the series.)
1. (1010), (10100), (11110), ? 2. (10), (20),, (40), ?
3. (170),, (175),, (202), ?
#ScreenShot
its equivalent decimal value.
Fill in the boxes with the positional values and give
A P
Hexadecimal Number
Positional Value
Decimal Number:
1 6
Octal Number 2
Positional Value
Decimal Number:
1 1
Binary Number
Positional Value
Decimal Number:
#OpenForum
class discussion on 'Application Areas of Different Number Systems'
can be taken up
A
in the class.
#HyperLink
Mathematics
system.
The Roman number system is agood example of a non-positional number
Compare positionaland non-positional number systems.