0% found this document useful (0 votes)
5 views45 pages

Chapter 1

Uploaded by

mohamed hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views45 pages

Chapter 1

Uploaded by

mohamed hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

CHAPTER 1

INTRODUCTION TO THE COMPUTER


INTERNAL STRUCTURE
 Architecture is those attributes visible to the
programmer
 Instruction set, number of bits used for data
representation, I/O mechanisms, addressing
techniques.
 e.g. Is there a multiply instruction?
 Organization is how features are implemented
 Control signals, interfaces, memory technology.
 e.g. Is there a hardware multiply unit or is it done by
repeated addition?
 All Intel x86 family share the same basic
architecture
 The IBM System/370 family share the same basic
architecture

 This gives code compatibility


 At least backwards (a newer version of a product is
compatible with an older version).
 Organization differs between different versions
 Vacuum tube - 1946-1957
 Transistor - 1958-1964
 Small scale integration - 1965 on
 Up to 100 devices on a chip
 Medium scale integration - to 1971
 100-3,000 devices on a chip
 Large scale integration - 1971-1977
 3,000 - 100,000 devices on a chip
 Very large scale integration - 1978 -1991
 100,000 - 100,000,000 devices on a chip
 Ultra large scale integration – 1991 -
 Over 100,000,000 devices on a chip
 Computers have gone through many changes
over time.
 The first generation of computers started around
1940 and since then there have been five
generations of computers until 2023.
 Computers evolved over a long period of time,
starting from the 16th century, and continuously
improved themselves in terms of speed, accuracy,
size, and price to become the modern day
computer.
5
6
7
How many transistors are their in old
and current MPs?

- Intel 8080 (year 1974)


>>
- 6000
- i7 (year 2016)
>>
~3 billion

8
With advances in semiconductor
technologies, MPs are becoming:
- smaller
- more powerful
- faster
- cheaper

..hence MPs can be easily embedded


in several systems (e.g. car, fridge,
watch..) to enhance their performance
while remaining within public reach.
9
10
Personal
computers

11
https://www.desktopclass.com/computer-it/discuss-primary-components-of-a-computer-system.html

12
1. Memory

2. CPU (processor)

3. I/O Devices

4. Bus System

13
CPU – controls the operation of the computer and
performs its data processing functions
 Main Memory – stores data
 I/O – moves data between the computer and its
external environment
 System Interconnection – some mechanism that
provides for communication among CPU, main
memory, and I/O

14
15
Registers
1. Speed increases Inside
2. Cost increases CPU
3. Size decreases Cache (~ )

RAM (~)
Outside
CPU
Hard Disk (~ )
16
Unit Equivalent Byte Capacity
Byte (B) 1 1
kilobyte (kB) 210 1,024
Megabyte (MB) 220 1,048,576
Gigabyte (GB) 230 1,073,741,824
Terabyte (TB) 240 1,099,511,627,776
Petabyte (PB) 250 1,125,899,906,842,624

17
1. Registers are the processor’s memory used for storing
intermediate results.

2. Cache memory holds copies of frequently accessed


data in order to speed up the data transfer from the
hard disk to RAM.

3. RAM is where all the active data and programs are


stored so that they can be easily accessed by the CPU.

4. Hard disk is the computers main storing device.


18
19
https://www.proprofs.com/quiz-school/story.php?title=input-output-devices_1

20
Operation:
x=3; x=x+1;

Data:
>> 3

Control:
>> add

Address: https://en.wikipedia.org/wiki/System_bus

>> address of x

21
How are microprocessors
programmed?

…. Code

22
23
24
x=3;
x=x+1;
cout<<“x=“<<x<<endl;

Compiler LDA X
INC X
PRINT X

Assembler

000101001010011111
25

26
27
28
29
30
Part 1:
.
 Understanding internal architecture of basic CPU

 Learning to program a basic CPU

 Getting acquainted with several CPU aspects

31
1. Binary Numbers

2. 2’s complement

3. Hexa Decimal

4. Combinational vs. Sequential Circuits

32
1. Binary numbers

33
1. Binary numbers

>> (0010 0011)2 = 1 + 2 + 32 = 35

34
1. Binary numbers
Binary
Dec.
128 64 32 16 8 4 2 1
2 0 0 1 0
20 0 0 0 1 0 1 0 0
-20 1 1 1 0 1 1 0 0

35
2. 2’s complement
Decimal Binary
8 4 2 1
2 0 0 1 0
-2 1 1 1 0

5 0 1 0 1
-5 1 0 1 1

4 0 1 0 0
-4 1 1 0 0
36
3. hexadecimal

Binary: 1111 0101 1010 0111


1111 0101 1010 0111
Hexa F 5 A 7
hexa 3 1 B 4
0011 0001 1011 0100

37
3. hexadecimal

38
4. Combinational
vs sequential circuits

A. Combinational (no clk)


 Ex: adder – decoder - mux
 Output depends on input at the present moment
only.

B. Sequential (clk)
 Ex. Delay Flip flop (Registers) – Toggle FF
 Output depends on history of the inputs

39
4A. Combinational circuits
MULTIPLEXER (MUX)

S1 S0 Y

Inputs: 2n
Select lines:
Output:
40
4A. Combinational circuits
DECODER

E A1 A0 Y3 Y2 Y1 Y0

Inputs: 2n Output:
41
4A. Combinational circuits
ADDER/SUBTRACTOR (TUTORIAL)

42
4B. SEQUENTIAL circuits
DFF / TFF

43
4B. SEQUENTIAL circuits
REGISTERS

- Clock: essential for operation


- Load: Q  D (must be 1 to store new value)
- Clear: Q3Q2Q1Q0 = (0000)2
44
4B. SEQUENTIAL circuits
REGISTERS

input output

45

You might also like