Chapter Three
Data Representation
in
Computer
Data and Information
Data +Meaning=Information
Data: is any type of representation of an object, an event or a fact
Representation could be in the form of , number , text symbols ,
voice, static or dynamic image etc.
Attributes Eg. 1Data
Customer Name Kidanye
Equipment type Computer
Equipment Name Laptop
Date 02/03/2005 e.c
Price $ 860.50
Data and Information…
Information: is data that has been processed in
such a way as to be meaningful to the person
who receives it.
Compiled or useful data for decision making.
Enables the analyst to determine the current status
of the observed behavior and to predict future
behavior.
Planning, Recording, Controlling, Measuring
and Decision-making.
Information Technology
• The use of modern technology to aid the capture, processing
storage and retrieval, and communication of information,
whether in the form of numerical data, text, sound, or image .
• It refer to a wide variety of items and abilities used in the
creation storage and dispersal of information
• Three primary components:
• Computer
• Communications networks, and
• Know-how
• The ways in which these components are combined
determine the organizations to be productive, effective
and successful .
Data Processing
• Is the process of converting data in to
information? The process usually assumed to be
automated and running on a personal computer
(Generally information communication
technology).
• Data processing can apply to any process that
converts data form one formats to another ; for
this perspectives , data processing becomes the
processes of converting data in to information &
also the converting of information back in to data.
11/1/2021 5
Basics Operations of data processing
1. Input refers capturing the information. During the
operation data is entered or capture electronically and
is converted to a form that can be processed by the
electronic machine (computer).
2. Processing the data is manipulated (analyzed) to
transform in to useful information.
3. Output generating the processed data ( information)
to the user using different devices.
4. Disseminating dispatching the information to the
appropriate user through communication Medias.
5. Storing accumulating the processed data for later use
or processing. 11/1/2021 6
Information source
Information sources generally categorized in to two broad
categories.
1. Documentary information sources: obtain them
either in paper printed format or electronically recorded
format, categorized in to three groups.
A. Primary DIS: - they are original material. They are
from the time period involved and have not been
filtered through interpretation.
11/1/2021 7
Example:
• Diaries
• Interviews( legal proceedings, personal, telephone, e-mail)
• Letters
• Original document
• Patents
• Photographs
• Proceedings( meeting, Conference, and Symposia)
• Survey research
• Works of Literature
11/1/2021 8
B. Secondary DIS: are accounts written after the fact
with the benefit of hindsight. They are interpretation and
evaluations of primary sources.
• Scholarly periodicals • Commentaries
• Books • Monographs
• Text books
C. Tertiary DIS: consists of information which is a
distillation on collection of primary & secondary sources.
Almanac
Fact books
Indexes (used to locate primary & secondary information sources)
Encyclopedias 11/1/2021 9
2. Non-documentary Information Sources:
Those information sources which don’t recorded in
any format.
public speech
informal talks with friends
discussion group etc…
• Formal : an information sources from formal
meetings , conferences
• Non formal: informal communication with friends,
discussion group etc… 11/1/2021 10
Data Representation and Numbering Systems
• We know that the computer is an electronic
device it works using electrical signals.
• Electrical signals can represent only two states;
on and off.
• So in digital information processing we use the
binary number system which has two digits
(0 and 1).
11/1/2021 11
Size
Name Example
(bits)
Bit 1 1
Nibble 4 0101
Byte 8 0000 0101
Word 16 0000 0000 0000 0101
Double
32 0000 0000 0000 0000 0000 0000 0000 0101
Word
11/1/2021 12
Number System
• Binary number System: all consist of combinations
of the two digits '0' and '1‘ (a base-two system).
• Octal Number System: includes only the digits 0,
1, 2, 3, 4, 5, 6, 7 (a base 8 system).
• Decimal Number System: includes only the digits
0,1,2,3,4,5,6,7,8,9 (a base 10 system).
• Hexadecimal Number System: includes only digits
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (a base 16 system).
11/1/2021 13
Decimal Binary Octal Hexadecimal
00 0000 00 00
01 0001 01 01
02 0010 02 02
03 0011 03 03
04 0100 04 04
05 0101 05 05
06 0110 06 06
07 0111 07 07
08 1000 10 08
09 1001 12 09
10 1010 13 0A
11 1011 14 0B
12 1100 15 0C
13 1101 16 0D
14 1110 17 0E
15 1111 18 0F
11/1/2021 14
Number Base Conversion
Binary to Decimal
It is very easy to convert from a binary number to a
decimal number. Just like the decimal system, we multiply
each digit by its weighted position, and add each of the
weighted values together. Eg. (1100 1010)2 = (202)10
1716050413021100
1x27 + 1x26 + 0x25 + 0x24 + 1x23 + 0x22 + 1x21 + 0x20
1 x 128 + 1 x 64 + 0 x 32 + 0 x 16 + 1 x 8 + 0 x 4 + 1 x 2 + 0 x 1
11/1/2021 15
Decimal to Binary
There are two methods that may be used to convert from
decimal to binary, repeated division by 2, and repeated
subtraction by the weighted position value.
Repeated Division By 2 : For this method, divide the
decimal number by 2, if the remainder is 0, on the side
write down a 0. If the remainder is 1, write down a 1. This
process is continued by dividing the quotient by 2 and
dropping the previous remainder until the quotient is 0.
11/1/2021 16
Repeated Division By 2 Mthod
Eg. (11)10 = (1011)2
Division Quotient Remainder Binary Number
11/ 2 5 1 1
5/2 2 1 11
2/2 1 0 011
1/2 0 1 1011
11/1/2021 17
The Subtraction Method
• For this method, start with a weighted position value
greater that the number.
• If the number is greater than the weighted position
for the digit, write down a 1 and subtract the
weighted position value.
• If the number is less than the weighted position for
the digit, write down a 0 and subtract 0.
• This process is continued until the result is 0.
11/1/2021 18
The Subtraction Method
Eg. (11)10 = (1011)2
Weight Subtraction Remainder Binary Number
2^4 =16 11-0 11 0
2^3 =8 11-8 3 01
2^2 =4 3-0 3 010
2^1 =2 3-2 1 0101
2^0 =1 1-1 0 01011
11/1/2021 19
Exercise
(2671)10=(XXXXXXX)2
Repeated Division By 2 Method
The Subtraction Method
(1010 0110 1111)2
11/1/2021
(312)10=(???????)2 20
Number Base Conversion …
Binary to Hex Conversion
It is easy to convert from an integer binary
number to hex. This is accomplished by:
Break the binary number into 4-bit sections from
the LSB to the MSB.
Convert the 4-bit binary number to its Hex
equivalent.
1011001010
0010 1100 1010
2 C A 11/1/2021 21
Number Base Conversion …
Hexadecimal into binary number
Simply brake the binary number into 4-bit groups
beginning with the LSB and substitute the
corresponding four bits in binary for each
hexadecimal digit in the number.
Eg. (A092D)H
A 0 9 2 D
(10100000100100101101)2
11/1/2021 22
Number Base Conversion …
Hexadecimal to Decimal
To convert from Hex to Decimal, multiply the
value in each position by its hex weight and add
each value. Using the value from the previous
example, 0AFB2H, we would expect to obtain the
decimal value 44978.
AFB2
A*16^3+F*16^2+B*16^1+2*16^0
10*4096+15*256+11*16+2*1
40960 + 3840 + 176 + 2
11/1/2021 23
44978
Number Base Conversion …
Decimal to Hex Conversion
To convert decimal to hex is slightly more difficult.
The typical method to convert from decimal to hex
is repeated division by 16. While we may also use
repeated subtraction by the weighted position
value, it is more difficult for large decimal
numbers.
11/1/2021 24
Repeated Division By 16
44978 = AFB2
Division Quotient Remainder Hex Number
44978 / 16 2811 2 2
2811 / 16 175 11 B2
175 / 16 10 15 FB2
10 / 16 0 10 0AFB2
11/1/2021 25
Number Base Conversion …
Binary to Octal Conversion
It is easy to convert from an integer binary number to
octal. This is accomplished by:
• Break the binary number into 3-bit sections from
the LSB to the MSB.
• Convert the 3-bit binary number to its octal
equivalent. 1010111110110010
001010111110110010
1 2 7 6 6 2
11/1/2021
127662 26
Number Base Conversion …
Octal to Binary Conversion
It is also easy to convert from an integer octal
number to binary. This is accomplished by:
• Convert the decimal number to its 3-bit binary
equivalent.
• Combine the 3-bit sections by removing the
spaces. 127662
1 2 7 6 6 2
001010111110110010
11/1/2021
1010111110110010 27
Number Base Conversion …
Octal to Decimal Conversion
To convert from Octal to Decimal, multiply the
value in each position by its Octal weight and add
each value. Using the value from the previous
example, 127662Q, we would expect to obtain the
decimal value 44978.
1*8^5+2*8^4+7*8^3+6*8^2+6*8^1+2*8^0
1*32768+2*4096+7*512+6*64+6*8+2*1
32768+8192+3584+384+48+2
11/1/2021 44978 28
Number Base Conversion …
Decimal to Octal Conversion
To convert decimal to octal is slightly more
difficult. The typical method to convert from
decimal to octal is repeated division by 8. While
we may also use repeated subtraction by the
weighted position value, it is more difficult for
large decimal numbers.
11/1/2021 29
Repeated Division By 8
44978 = 12662
Division Quotient Remainder Octal Number
44978 / 8 5622 2 2
5622 / 8 702 6 62
702 / 8 87 6 662
87 / 8 10 7 7662
10 / 8 1 2 27662
111/1/2021
/8 0 1 127662 30
Exercise
• Binary to Decimal & vise Versa ?
• Hexadecimal to Binary & Vise Versa?
• Hexadecimal to Decimal ?
• Octal to Binary & Vise versa ?
• Octal to Decimal ?
11/1/2021 31
CODING METHODS
• We have said any information to be processed by
a digital computer
(numbers,characters,pictures…) has to be y as a
series of electrical switches (on’s and off’s) in
arranged manner. Or simply it should be
represented by the two digits of the binary
number system.
• There are different coding systems, that convert
one or more character sets into computer codes.
Examples are BCD and ACSII
11/1/2021 32
BCD (4-bits)
• Stands for Binary Coded Decimal
• It converts every digit of a decimal number to binary.
Decimal Number BCD
81 1000 0001
935 1001 0011 0101
11/1/2021 33
ASCII-7
• ASCII stands for American Standard Code for
Information Interchange
• Used widely before the introduction of ASCII-8
(the Extended ASCII)
• Uses 7 bits to represent a character;
• With the seven bits, 27( or 128) different
characters can be coded (0000000-1111111)
• It has a zone and digit bits positions
11/1/2021 34
ASCII-7
Character Zone digit
$ 010 0100
% 010 0101
A 100 0001
a 110 0001
b 110 0010
11/1/2021 35
The ASCII System
• ASCII stands for American Standard Code for
Information Interchange
• It is the most widely used type of coding
scheme for Micro Computer system
• ASCII uses 8-bits to represent alphanumeric
characters(letters, digits and special symbols).
• With the 8-bits, ASCII can represent 28 or 256
different characters (00000000-11111111).
11/1/2021 36
Character Binary representation in ASCII
a 01100001
b 01100010
A 01000001
B 01000010
? 00111111
+ 00101011
11/1/2021 37
Thank you
11/1/2021 38
Quiz
Binary Octal Decimal Hexa
0110101 Q1 Q2 Q3
Q4 215 Q5 B1
Q6 Q7 465 Q8
Q9 B2 Q10 B3
11/1/2021 39