Lecture01-Introduction and Data Representation 1
Lecture01-Introduction and Data Representation 1
1
Instructors
• Dr. Rand H Raheem
– Office: TG17
– Email: [email protected]
2
Course Goals
• Understand the fundamentals of computer hardware
and architecture
3
Textbooks
• Textbook for computer architecture
W Stallings, (2016), Computer Organization and Architecture
(10th Edition), Prentice Hall. (Essential)
4
Class Details
• 1h Lecture & 2h Lab sessions per week
1H 2H 1H 2H 1H 2H 1H 2H 1H 2H
Lecture Lab Lecture Lab Lecture Lab Lecture Lab Lecture Lab
1st WEEK 2nd WEEK 3rd WEEK 23th WEEK 24th WEEK
• Consultation times
– Office Hours: Email your module leader
5
Assessment
SOBs (40%)
• Every week
6
What is Computer
Architecture?
• The study of the computer hardware
7
Outline for Computer
Architecture
• Data representation
• Introduction to digital logic
• Combinatorial & sequential logic design
• Overview of a computer and CPU
• Instruction sets and addressing modes
• Machine, Assembly and high level programming
• Primary and secondary storage
• Control unit and microprogramming
• More computer architecture
• Input-Output
8
Overview of Data
Representation
• What is data? Data - a fact (information)
• Bits, bytes, words
• Characters
• Integers
• Binary, octal, hexdecimal notation
• Conversions between binary, octal, hex, decimal
• Representation of negative numbers
• Binary addition and subtraction
• Representation of real numbers
9
How is Data Represented In a
Computer?
• The digital computer is binary
or
10
How is Data Represented In a
Computer?
• Values are represented as sequences bits: 1000001
11
How is Data Represented in a
Computer?
• It depends on how you interpret it:
– 65 (in decimal)
– ‘A’ (in ASCII)
– Or anything else you want it to mean!
12
Computer Memory
• The data currently being worked on is (normally) stored in
the computer's memory
1 nybble = 4 switches
1 byte = 8 switches
7 6
5
4
3
2
1
0
0 15
1
A Word of Memory
• The word is the number of bits the CPU uses
internally. It varies from manufacturer to
manufacturer and from CPU to CPU. These
days it is usually 32 or 64 bits.
• Bits Computer
– 8 Atari 800, Commodore 64, Apple ][ IBM PC
– 16 XT, Macintosh, DEC VAX DEC PDP 15
– 18 IBM 370, early Android and iOS phones
– 32 Honeywell, UNIVAC
– 36 Cray-1, iMac, PC, and modern
16
– 64 smartphones
Characters
• A character (char ch;) is a written symbol. They
are (for English) represented as a single byte. In
other languages they can be represented as 2 bytes
(or more).
• Characters include:
– UPPER CASE LETTERS AC X...
– lower case letters b g k
– Single digits ...
– Special characters 3 1 9
...
! in<sequences
• We can join these together = to make
...
(human readable) numbers and words
17
ASCII Character Code
• How does the computer know that ch is an 'A' and not 'a' or '3' or anything
else? It doesn’t!
0001000000101000010001001000001010000010111111101000001010000010
18
ASCII Character Code
0001000000101000010001001000001010000010111111101000001010000010
• But there are only a few letters, numbers, and punctuation marks. The
remanning ASCII codes are non-printing and have other meaning (such
as line feed, form feed, tab, etc.).
20
ASCII Character Code (cont)
ASCII Character Code (cont)
• ASCII characters are represented by a 7-bit code.
• E.g. letter ‘A’ = 65 = 1000001
22
Other Character Codes
EBCDIC Extended Binary Coded Decimal Interchange
Code. Used with large (old) IBM computers.
23
EBCDIC
BAUDOT
80 column
BCD
Unicode
• What about all the non-Roman characters?
– Greek, Arabic, Chinese, Hebrew, Japanese, Thai, etc.
• What about characters that represent ideas, concepts,
phrases?
– Emoji, etc.
• Unicode
– Developed by The Unicode Consortium
– Coordinated with ISO/IEC 10646
• Originally a 16-bit code (compatible with ASCII)
– Mapped 16-bit values into glyphs (characters)
– 65,536 characters were possible
• Now a 21-bit code with 136,690 characters from 139 scripts
– Some (many) are reserved
25
Unicode (cont)
http://www.unicode.org/charts/PDF/U11D00.pdf
26
Character Strings
• Think of this….
– How are character strings (e.g. “hello world”) stored in a
computer?
27
Summary
• Your machine speaks different language than yours. It is zeros
and ones (Binary)