0% found this document useful (0 votes)
5 views36 pages

Understanding Number Systems in IT

Uploaded by

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

Understanding Number Systems in IT

Uploaded by

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

Lesson 2

THE NUMBER SYSTEM


What is a Number System?
A number system is defined as the representation of numbers
by using digits or other symbols in a consistent manner.

The value of any digit in a number can be determined by a


digit, its position in the number, and the base of the number
system.

The numbers are represented in a unique manner and allow us


to operate arithmetic operations like addition, subtraction,
and division.
Significance of Number System in IT
Our general mode of communication with each other is made of letters or
words. We send our message or information through the keyboard by
typing letters or words; But computers don’t have brains like us. So how
do they understand us?

Thanks to the compiler that makes computers understand our language.


Compilers change the human language to numbers. Thus computers
understand only numbers.

We use the decimal number system in general. However, the computers


understand the binary number system. The octal and hexadecimal
number systems are also used now-a-days by computers.
Types of Number System?
There are different types of number systems in
which the four main types are:

• Binary number system (Base - 2)


• Octal number system (Base - 8)
• Decimal number system (Base - 10)
• Hexadecimal number system (Base - 16)
Number System
Dec (Decimal) – base 10
(uses digits from 0 to 9)

Hex (Hexadecimal) – base 16


(uses digits from 0-9 and
symbols A, B, C, D, E and F)

Oct (Octal) – base 8


(uses digits from 0-7)

Bin (Binary) – base 2


(uses digit 0 and 1 only)
Decimal Number System
• The decimal number system uses the following ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8,
and 9.

• Hence, the numbers in this system have a base of 10

• If we come across a number without a base, it means that its base is 10.

• This is the system that use in order to represent numbers in real life

• Examples: 1810, 222, 787710


• 129

Applications: We use decimals everyday while dealing with


money, weight, length etc. Whole numbers provide less
precision, therefore decimal numbers are used where
more precision is required
Binary Number System
• Binary number system uses just two digits: 0 and 1.
• Hence, the numbers in this system have a base 2.
• 0 and 1 are called bits.
• 8 bits together make a byte. Example: 10100101, 00010101, 10010101
• The data in computers is stored in the form of bits and bytes.
• Examples: 10112, 1112

Application: In modern technology, the binary number system is an


indispensable part of computer science. Every computer language and
programs are based on the binary number system. It is also used in
digital encoding ( the process of representing data as discrete bits of
information).
Octal Number System
• The octal number system uses the following eight digits: 0, 1, 2, 3, 4, 5, 6, and 7.
• Hence, the numbers in this system have a base 8.
• The advantage of this system is that it has less number of digits and therefore, there
would not be many computational errors.
• Examples: 2458, 518

Application: The Octal number system was used widely within IT


similar to how hexadecimal is used today. However, there are some
places where octal is still widely utilized. It is also used within digital
displays, which does not support symbols.
Hexadecimal Number System
• The hexadecimal number system uses the following sixteen digits/alphabets: The
digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and following are the alphabets A, B, C, D, E, and
F.
• Therefore, the numbers in this system have a base of 16.
• Here, A−F of the hexadecimal system indicate the numbers 10−15 of the decimal
number system respectively.
• This system is widely used in computers in order to reduce the large-sized strings of
the binary system.
• Examples: A7B16, BC16

Applications: A computer can understand number systems that use


only a few symbols called digits. These symbols denote different
values corresponding to the position they occupy in the number.
Computers are usually designed to process hexadecimal numbers.
Since we already mastered the
Decimal Number System, we have to learn
how to Convert other number systems to
Decimal Number System to know its value.
Binary to Decimal
Convert 11010102 to the decimal system

(A) Number 1 1 0 1 0 1 0
Base 2 26 25 24 23 22 21 20
(B) Result 64 32 16 8 4 2 1
A*B 64 32 0 8 0 2 0

Therefore, 11010102 = 64+32+0+8+0+2+0 = 10610 or 106


Octal to Decimal
Convert 67508 to the decimal system

(A) Number 6 7 5 0
Base 8 83 82 81 80
(B) Result 512 64 8 1
AxB 3,072 448 40 0

Therefore, 67508 = 3,072+448+40+0 = 356010 or 3560


Hexadecimal to Decimal
Convert 1AB16to the decimal system

Number 1 A B
(A) Hex Equivalent 1 10 11
Base 16 162 161 160
(B) Result 256 16 1
AxB 256 160 11

Therefore, 1AB16 = 256+160+11 = 42710


Let us swap things out!
Decimal to Binary
Convert 595 to Binary
Dividend Divisor Quotient Remainder
595 2 297 1
297 2 148 1
148 2 74 0
74 2 37 0
37 2 18 1
18 2 9 0
9 2 4 1
4 2 2 0
2 2 1 0
1 2 0 1

Therefore, 595 = 10010100112


Decimal to Octal
Convert 1067 to Octal

Dividend Divisor Quotient Remainder


1067 8 133 3
133 8 16 5
16 8 2 0
2 8 0 2

Therefore, 1067= 20538


Decimal to Hexadecimal
Convert 21427 to Hexadecimal

Dividend Divisor Quotient Remainder Hexadecimal


Value
21427 16 1339 3 3
1339 16 83 11 B
83 16 5 3 3
5 16 0 5 5

Therefore, 21427= 53B316


ORAL
RECITATION
What is the decimal
equivalent of the binary
number 101011?

43
Solution:

1 * 2^0 = 1
1 * 2^1 = 2
0 * 2^2 = 0
1 * 2^3 = 8
0 * 2^4 = 0
1 * 2^5 = 32

Now, sum these values together:


1 + 2 + 0 + 8 + 0 + 32 = 43

So, the decimal equivalent of the binary number


101011 is 43.
Convert the decimal number
28 into binary.

11100
Solution:

28 ÷ 2 = 14 remainder 0
14 ÷ 2 = 7 remainder 0
7 ÷ 2 = 3 remainder 1
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Reading the remainders from bottom to top, you get
the binary representation: 11100.

So, 28 in binary is 11100.


Convert the decimal number
95 into octal.

137
Solution:

95 ÷ 8 = 11 remainder 7
11 ÷ 8 = 1 remainder 3
1 ÷ 8 = 0 remainder 1

Reading the remainders from bottom to top, you get


the octal representation: 137.

So, 95 in octal is 137.


Convert the decimal number
255 into hexadecimal.

FF
Solution:

255 ÷ 16 = 15 remainder 15 (which is F in


hexadecimal)
So, the hexadecimal representation of 255 is FF.
What is the decimal
equivalent of the
hexadecimal number 1A3?

419
Solution:

3 * 16^0 = 3
A (which is 10 in decimal) * 16^1 = 160
1 * 16^2 = 256
Now, sum these values together:
3 + 160 + 256 = 419

So, the decimal equivalent of the hexadecimal


number 1A3 is 419.
Convert the octal number 72
into decimal.

58
Solution:

2 * 8^0 = 2
7 * 8^1 = 56
Now, sum these values together:
2 + 56 = 58

So, the decimal equivalent of the octal number 72 is


58.
What is the decimal value of
the binary number 1101011?

107
Solution:

1 * 2^0 = 1
1 * 2^1 = 2
0 * 2^2 = 0
1 * 2^3 = 8
0 * 2^4 = 0
1 * 2^5 = 32
1 * 2^6 = 64
Now, sum these values together:
1 + 2 + 0 + 8 + 0 + 32 + 64 = 107

So, the decimal value of the binary number 1101011


is 107.
Convert the decimal number
13 into binary.

1101
Solution:

13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Reading the remainders from bottom to top, you get
the binary representation: 1101.

So, 13 in binary is 1101.


What is the decimal
equivalent of the
hexadecimal number FF?

255
Solution:

F (which is 15 in decimal) * 16^0 = 15


F (which is 15 in decimal) * 16^1 = 240

Now, sum these values together:


15 + 240 = 255

So, the decimal equivalent of the hexadecimal


number FF is 255.

You might also like