0% found this document useful (0 votes)
10 views39 pages

ICT Lecture 04

Uploaded by

Sundus Farooq
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)
10 views39 pages

ICT Lecture 04

Uploaded by

Sundus Farooq
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
You are on page 1/ 39

Lecture 04 (Ch 02)

CSC 101 – Introduction


to Computing
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

2
Data and Program
Representation
• Digital Data Representation
– Coding Systems
• Used to represent data and programs in a manner
understood by the computer
– Digital Computers
• Can only understand two states, off and on
(0 and 1)
– Digital Data Representation
• The process of representing
data in digital form so it can be
understood by a computer

3
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).

4
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

5
Representing Numerical
Data

6
Coding Systems for
Text-Based Data
• ASCII (American Standard Code for
Information Interchange)
– Coding system traditionally used
with personal computers
• EBCDIC (Extended Binary-Coded
Decimal Interchange Code)
– Developed by IBM, primarily
for
mainframes

7
Coding Systems for
Text-Based Data
• Unicode
– Newer code (32 bits per character is common)
– Universal coding standard designed to represent text-
based data written in any ancient or modern language
– Replacing ASCII as the primary text-coding system

8
Coding Systems for
Other Types of Data
• Graphics Data (still images such as photos or drawings)
– Bitmapped images
• Image made of up of a grid of small dots called pixels
• Monochrome graphic can only be one of two colors
– Requires just one bit for color storage
• Images with more than two colors
– Can use 4, 8, or 24 bits to store the color data for
each pixel
– More bits = more colors

9
Coding Systems for
Other Types of Data

10
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

11
Representing Software
Programs
• Machine language
– Binary-based language for representing computer
programs the computer can execute directly
– Early programs were written in machine language
– Today’s programs still need to be translated into
machine language in order to be understood by the
computer

12
Decimal To Binary
1

13
Decimal To Binary
 (151)10 = (10010111)2

14
Decimal to Binary (with Fractions)

 (12.75)10 = (1100.11)2

15
Binary to Decimal

16
Binary to Decimal

17
Binary to Decimal
 11100012 = 11310

18
Binary to Decimal

 111001111012 =
185310
 110110102 = 21810

19
Binary to Decimal (with
Fractions)
 (10.011010101)2 =
(2.416015625)10

20
Exercise Decimal to
Binary

21
Decimal to Octal
 432110 = 103418

22
Octal to Decimal

 7438 = 48310 265258 = 1160510

23
Exercise Decimal to
Octal

24
Exercise Octal to
Decimal

 266018 =
 14228 =

25
Decimal to
Hexadecimal

26
Decimal to
Hexadecimal

27
Hexadecimal to Decimal

28
Hexadecimal to Decimal
 (ABC.123)16 =
(2748.0710449219)10

29
Comparison Base 2 to
Base 16

30
Binary to Hexadecimal

31
Hexadecimal to Binary and Octal

32
Octal to Hexadecimal

33
Exercise Binary to
Hexadecimal
 (10110101010101  (1100010010)2
)2

34
Exercise Octal to
Hexadecimal
 (344)8  (1422)8

35
Number System
Program
 Genius Maker
 Free software
 Use the number system

http://www.goldenkstar.com/number-system-school-software-
maths.htm
36
Summary
 Number System
 Decimal

 Binary

 Octal

 Hexadecimal

 Number conversion

37
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

38
Number System -
Exercise
Decimal Binary Octal Hexadecima
l
(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
(48879)1 (11111101110111 (137357)8 (BEEF)16 39

You might also like