Title: Raul CruzCano
1Lecture 3
- Raul Cruz-Cano
- CIS 340 Computer Architecture
- Texas AM University Texarkana
- Fall 2008
2Announcements
- Exam 1 October 6, 2008
- Material from first session to ½ next session.
- Next session after recess we will have a review
3Characters Representation
- Each character is encoded by 8 bits
- American Standards Committee on Information
Interchange (ASCII) encoding system 7 bits
encoding - The 8th (most significant) bit is used to encode
characters from different alphabets and some
extra special symbols
4T
ABLE
E.1
Binary-Coded Decimal (BCD)
encoding
of
decimal
digits
digit
Decimal
BCD
co
de
0
0000
1
0001
2
0010
3
0011
4
0100
5
0101
6
0110
7
0111
8
1000
9
1001
5Hexadecimal Numbers
- Base 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
- (Z3Z2Z1Z0)H
- (Z3x 163)(Z3x 162)(Z3x 161)(Z3x 160)
- (Z3x4096)(Z3x 256)(Z3x 16)(Z3x
1) - Example (A34E)H
- (A x 163)(3 x 162)(4 x
161)(E x 160) - (Ax4096)(3x 256)(4x
16)(E x 1) - (10x4096)(3x 256)(4x 16)(14
x 1) - 40960768641441806.
6Hexadecimal Numbers Advantages
- Easier to represent large numbers in compact
manner - Close relationship to binary numbers
- Ex. Find the binary representation of
110101101011101 - 110 1011
0101 1101 - 6D6H 11DBH 5D5H
13DCH -
- (110101101011101)B(6B5C)H
- and vice versa
- OS used it to represent the values of registers,
contents of memory address, etc
7Conversion Hexadecimal-Decimal
- Same old, same old!!!!
- Hexadecimal to Decimal Already studied during
the definition of HEX numbers. - Decimal to HEX Same process as with binary.
- Example (1574)D(?)H
- 1974 / 16 123 rem 6
- 123 / 16 7 rem 11
- Hence (1574)D(7B6)H
8Table of ASCII Characters
9Review
- If you want to know more
- Appendix E1(pp. 790-793)
10Boolean Operations (Irvine Book, Chapter 1)
- NOT
- AND
- OR
- Operator Precedence
- Truth Tables
11Boolean Algebra
- Based on symbolic logic, designed by George Boole
- Boolean expressions created from
- NOT, AND, OR
12NOT
- Inverts (reverses) a boolean value
- Truth table for Boolean NOT operator
13AND
- Truth table for Boolean AND operator
14OR
- Truth table for Boolean OR operator
15Operator Precedence
- Examples showing the order of operations
16Truth Tables (1 of 3)
- A Boolean function has one or more Boolean
inputs, and returns a single Boolean output. - A truth table shows all the inputs and outputs of
a Boolean function
Example ?X ? Y
17Truth Tables (2 of 3)
18Truth Tables (3 of 3)
- Example (Y ? S) ? (X ? ?S)
19Why do we bother with digital logic?
20Translating Languages
English Display the sum of A times B plus C.
C cout ltlt (A B C)
Assembly Language mov eax,A mul B add eax,C call
WriteInt
Intel Machine Language A1 00000000 F7 25
00000004 03 05 00000008 E8 00500000
21Specific Machine Levels
(descriptions of individual levels follow . . . )