ICT Lecture 03 Number System
ICT Lecture 03 Number System
4
Digital Data Representation
– Bit
• The smallest unit of data that a
binary computer can recognize
(a single 1 or 0)
– Byte = 8 bits
• Byte terminology used to express
the size of documents and other
files, programs, etc.
– Prefixes are often used to express larger quantities of
bytes: kilobyte (KB), megabyte (MB), gigabyte (GB),
terabyte (TB), petabyte (PB), exabyte (EB), zettabyte (ZB),
yottabyte (YB).
5
Number Conversion
Decimal to Binary and Binary to
Decimal
Decimal to Octal and Octal to
Decimal
Decimal to Hexadecimal and
Hexadecimal to Decimal
Binary to Hexadecimal
Octal to Hexadecimal
Hexadecimal to Binary and Octal
6
Representing Numerical
Data
• Numbering System
A way of representing numbers
• Decimal numbering system
Uses 10 symbols (0-9)
• Binary numbering system
Uses only two symbols (1 and 0) to represent all
possible numbers
• In both systems, the position of the digits determines
the
power to which the base number (such as 10 or 2)
is raised
7
Representing Numerical
Data
8
Coding Systems for
Text-Based Data
• ASCII (American Standard Code for
Information Interchange)
– Coding system traditionally used with
personal computers
– Represent text in computers,
telecommunication system and other
devices.
– Communication
– Data transmission
• EBCDIC (Extended Binary-Coded
Decimal Interchange Code)
– Developed by IBM, primarily for
mainframes
9
Coding Systems for
Text-Based Data
• Unicode
– Unicode is a standard that assigns a unique number to each
character, allowing computers to represent and interpret text
from different languages.
– Universal coding standard designed to represent text-
based data written in any ancient or modern language
– Replacing ASCII as the primary text-coding system
10
Difference between Unicode
and ASCII
Difference between Unicode
and ASCII
Coding Systems for
Other Types of Data
• Audio Data
– Must be in digital form in order to be stored on or
processed by a computer
– Often compressed when sent over the Internet
• MP3 files are 10 times smaller than their uncompressed
digital versions
• Download more quickly and take up less storage space
• Video Data
– Displayed using a collection of frames, each frame contains
a still image
– Amount of data can be substantial, but can be compressed
13
Exercise
Data Types in Computing
Define and give an example of the following data types:
• Text Data
• Numerical Data (Integer & Float)
• Boolean Data
• Image Data
• Audio Data
15
Decimal Number System
The number system that we use in our day-to-day life is the
decimal number system. Decimal number system has base 10
as it uses 10 digits from 0 to 9. In decimal number system, the
successive positions to the left of the decimal point represent
units, tens, hundreds, thousands, and so on.
18
Decimal To Binary
(151)10 = (10010111)2
19
Decimal to Binary (with Fractions)
(12.75)10 = (1100.11)2
20
Binary number system
The easiest way to vary instructions through
electric signals is two-state system – on and
off. On is represented as 1 and off as 0,
though 0 is not actually no signal but signal
at a lower voltage. The number system
having just these two digits – 0 and 1 – is
called binary number system.
Each binary digit is also called a bit. Binary
number system is also positional value
system, where each digit has a value
expressed in powers of 2, as displayed here.
Binary number system
Characteristics
of the binary number
system are as follows −
• Uses two digits, 0 and 1
• Also called as base 2 number system
• Each position in a binary number represents
a 0 power of the base (2). Example 20
• Last position in a binary number represents
a x power of the base (2). Example
2x where x represents the last position - 1.
Binary to Decimal
(example)
And decimal equivalent of this number is sum of
product of each digit with its positional value.
▪ 110102 = 1×24 + 1×23 + 0×22 + 1×21 + 0×20
▪ 16 + 8 + 0 + 2 + 0
▪ 2610
Binary Number: 101012
24
Binary to Decimal
25
Exercise
11100012
111001111012
110110102
Binary to Decimal
11100012 = 11310
27
Binary to Decimal
111001111012 =
185310
110110102 = 21810
28
Binary to Decimal (with
Fractions)
(10.011010101)2 =
(2.416015625)10
29
Exercise Decimal to
Binary
30
Octal number system
Octal number system has eight digits – 0, 1, 2,
3, 4, 5, 6 and 7. Octal number system is also a
positional value system with where each digit has
its value expressed in powers of 8, as shown
here.
32
Exercise Decimal to
Octal
4321
932
1853
Decimal to Octal
432110 = 103418
34
Exercise Decimal to
Octal
35
Exercise Octal to
Decimal
266018 =
14228 =
36
Exercise Octal to
Decimal
266018 =
14228 =
37
Hexademical number
system
Hexadecimal number system has 16 symbols – 0 to 9 and
A to F where A is equal to 10, B is equal to 11 and so on till F.
Hexadecimal number system is also a positional value system
with where each digit has its value expressed in powers of 16,
as shown here.
39
Decimal to
Hexadecimal
40
Hexadecimal to Decimal
41
Hexadecimal to Decimal
(ABC.123)16 =
(2748.0710449219)10
42
Comparison Base 2 to
Base 16
43
Binary to Hexadecimal
44
Hexadecimal to Binary and Octal
45
Octal to Hexadecimal
46
Exercise Binary to
Hexadecimal
(10110101010101 (1100010010)2
)2
47
Exercise Octal to
Hexadecimal
(344)8 (1422)8
48
Number System
Program
Genius Maker
Free software
Use the number system
http://www.goldenkstar.com/number-system-school-software-
maths.htm
49
Summary
Number System
Decimal
Binary
Octal
Hexadecimal
Number conversion
50
Recommended
Websites
http://www.cdrummond.qc.ca/cege
p/informat/Professeurs/Alain/files/a
scii.htm
http://www.lookuptables.com/ebcdi
c_scancodes.php
http://math.comsci.us/radix/hexade
cimal.html
51
Number System -
Exercise
Decimal Binary Octal Hexadecimal
(786)10 (1100010010)2 (1422)8 (312)16
(555)10 (1000101011)2 (1053)8 (22B)16
(228)10 (11100100)2 (786)8 (786)16
(179)10 (10110011)2 (786)8 (786)16
(483)10 (111100011)2 (743)8 (1E3)16
(4012)10 (111110101100)2 (7643)8 (FAC)16
(4321)10 (1000011100001)2 (10341)8 (10E1)16
(1853)10 (11100111101)2 (3475)8 (73D)16
(9526)10 (1001010011011)2 (22466)8 (2536)16
(11605)1 (10110101010101) (26525)8 (2D55)16
0 2
52