Data Representation Computer Architecture 2nd Semester 2009-2010
Basic Idea DATA
In text of decimal format
Computer System
10010100101010 RAM 101101010010100101001010010100100101001010101
Data Representation
Computer operation mechanism › Binary Numbers (on / off)
It
is good to know binary numbers, decimal, hexadecimal numbers & the relationships of these number systems to understand the internal processing of computer
Data Representation Unit & processing unit Binary
Number in Circuit
› On / Off › High / Low
Binary and Decimal Conversion Decimal Numbers 0 1 2 3 4 5 6 7 8 9 10
Binary Numbers 0 1 10 11 100 101 110 111 1000 1001 1010
BITS A
Binary Digit(BiT) › Is a digit of Binary System represented
by 1or 0 › A smallest unit that represents data inside the computer › 1 bit can represent 2 values = {1,0} › 2 bits can represent 4 values = {00,01,10,11}
Question To
the minimum of how many bits we need to represent the 26 English Alphabet plus the alphanumeric 0 to 9 a)5 b)6 c)7 d)8
BYTE A
unit that represents with 8 bit 1 character or number › {00000001, 00000010, 00000011 …..
11111111}
› › Question: How many combinations that
a byte can provide a)64 b)128 c)256 d)512
›
Word If
the computer’s internal operation were performed on the bit basis, the operation speed would be too low. For that reason, the idea of processing using a unit called word was born
Word Over
10 yrs ago, PC operated on word consisting of 16 bits. Currently, mainstream PCs use words each consisting of 32 and 64 bits
Binary System and Hexadecimal Information
Processing
› Binary System is used to simplify the
structure of electronic circuit that make up a computer › (255)10 vs (11111111)2 binary is hard to understand Solution – use haxadecimal
Binary System and Hexadecimal Hexadecimal
number
› Numeric value represented by 16
numeral (0-15). When becomes 16, a carry occurs
Base 2,10 & 16 Table 0 0 1 0 1 1 0 1
2
D
Decimal
Binary
Haxadecimal
0
0
0
1
1
1
2
10
2
3
11
3
4
100
4
5
101
5
6
110
6
7
111
7
8
1000
8
9
1001
9
10
1010
A
11
1011
B
12
1100
C
13
1101
D
14
1110
E
15
1111
F
16
10000
10
17
10001
11
18
10010
12
19
10011
13
20
10100
14
Radix and “weight”
1,234 › 1 thousand 2 hundred 3 tens and 4 units › (1 x 103) + (2 x 102) + (3 x 101) + (4 x 100)
› Radix
Exponent Weight
Question: Using the weight, a decimal number 32,425 would be represented as?
Binary Digits “weight” and its meaning The
radix of decimal system is 10 and the radix of binary system is 2. Ex: 1 1 1 1 1 0 0 1 1 1 0
1
1
1
1
1
0
0
1
1
1
0
210
29
28
27
26
25
24
23
22
21
20
256
128
64
8
4
2
1024 512 Question:
Using the weight, a binary number 11110111 would be represented as?
Auxiliary units & power representation Unit symbol
Remarks
Unit that represent T (tera) large amount G (giga) M (mega) k (kilo)
Exponent notation 1012 109 106 103
Units that represent m (milli) small amonts µ (micro) n (nano) p (pico)
10-3 10-6 10-9 10-12
1 / 1,000 1 / 1,000,000 1 / 1,000,000,000 1 / 1,000,000,000,000
~ 240 ~ 230 ~ 220 ~ 210
Addition of Binary Numbers 0
+ 0 + 1 + 1 +
0 1 0 1
Question: 11010 + 1100
= = = =
0 1 1 10
Subtraction of Binary Numbers 0
0 1 1 -
0 1 0 1
Question: 11010 - 1100
= = = =
0 -1 1 0