Raul CruzCano - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Raul CruzCano

Description:

... to encode characters from different alphabets and some extra special symbols ... Same old, same old! ... English: Display the sum of A times B plus C. C : ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 22
Provided by: rcruz4
Category:

less

Transcript and Presenter's Notes

Title: Raul CruzCano


1
Lecture 3
  • Raul Cruz-Cano
  • CIS 340 Computer Architecture
  • Texas AM University Texarkana
  • Fall 2008

2
Announcements
  • Exam 1 October 6, 2008
  • Material from first session to ½ next session.
  • Next session after recess we will have a review

3
Characters 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

4
T
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
5
Hexadecimal 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.

6
Hexadecimal 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

7
Conversion 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

8
Table of ASCII Characters
9
Review
  • If you want to know more
  • Appendix E1(pp. 790-793)

10
Boolean Operations (Irvine Book, Chapter 1)
  • NOT
  • AND
  • OR
  • Operator Precedence
  • Truth Tables

11
Boolean Algebra
  • Based on symbolic logic, designed by George Boole
  • Boolean expressions created from
  • NOT, AND, OR

12
NOT
  • Inverts (reverses) a boolean value
  • Truth table for Boolean NOT operator

13
AND
  • Truth table for Boolean AND operator

14
OR
  • Truth table for Boolean OR operator

15
Operator Precedence
  • Examples showing the order of operations

16
Truth 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
17
Truth Tables (2 of 3)
  • Example X ? ?Y

18
Truth Tables (3 of 3)
  • Example (Y ? S) ? (X ? ?S)

19
Why do we bother with digital logic?
20
Translating 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
21
Specific Machine Levels
(descriptions of individual levels follow . . . )
Write a Comment
User Comments (0)
About PowerShow.com