제0장 가상컴퓨터 조직

Download Report

Transcript 제0장 가상컴퓨터 조직

0. Introduction to Computer
0.1 Binary Number System
Conversion(Bin
Dec)
Physical Representation
0
32
16
8
4
2
1
32
4
2
1001102
N S
+
1
N S
Dec Binary Hex
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
= 3810
Units:
bit
Byte(8 bit)
word(2 or 4 B)
KB(1,024 B) MB(1,024 KB) GB(1,024 MB)
Chap. 0 Introd. to Computer
1
0.2 Organization of a Hypothetic-Computer
CPU
CU
CPU: Cent’l Proc. Unit
ALU
AX
BX
CX
DX
PC
IR
bus:
CU: Control Unit
ALU: Arith./ Logic Unit
ID
clock
oszc
PC: Program Counter
IR: Instruction Register
R
data
R
data
OUTPUT
INPUT
00
01
02
03
04
05
06
07
08
09
0A
0B
ID: Instruction Decoder
Flag Reg: o, s, z, c
Registers: AX - DX
MEMORY
Chap. 0 Introd. to Computer
clock: clock generator
Interface Card
R: Ready bit
data: buffer register
2
0.3 Instruction Set
Group
Transfer
Arithmetic
Branch
Input/Output
Control
Machine code Mnemonic code
0001RdRs
MOV Rd, Rs
Rd
Operation
(Rs)
0010RdMm
0011MmRs
0100RdRs
0101RdRs
LOAD Rd, Mm
STORE Mm, Rs
ADD Rd, Rs
SUB Rd, Rs
Rd
Mm
Rd
Rd
(Mm)
(Rs)
(Rd) + (Rs), set Flag
(Rd) - (Rs), set Flag
0110Mm
0111Mm
1000Mm
1001RdPt
1010PtRs
JMP Mm
JL Mm
JZ Mm
IN Rd, Pt
OUT Pt, Rs
PC Mm
PC Mm, if S=1
PC Mm, if Z=1
Rd (Pt)
Pt (Rs)
0001
HALT
PC
Rd: destination register
Rs: source register
PC: program counter
Pt: port number
Chap. 0 Introd. to Computer
(PC)
Mm: memory address
3
0.4 Machine Language Program vs Assembly Language Program
To store
the bigger of A and B
to C
CU
ALU
AX
BX
CX
DX
PC
IR
Assembly L. Prog.
clock
ID
oszc
....
LOAD AX, A
LOAD BX, B
SUB AX, BX
JL ITSB
LOAD BX, A
ITSB: STORE C, BX
HALT
A:
DS 2
B:
DS 2
C:
DS 2
ALU
Assemble
Chap. 0 Introd. to Computer
00 0010000111
01 0010011000
02 01010001
03 01110101
04 0010000111
05 0011100101
06 10110000
07 00000011
08 00000101
09 00000000
0A
4
0.5 Programming Languages
• Low-level PL
Machine Language
Assembly Language
• High-level PL
10 C = A
20 if (B>A) then C = B
Interpreter L
Basic
APL
Smalltalk ...
compiler L
Fortran, Cobol, PL/1
Pascal, Ada
C, C++, ...
if (A>B)
then C := A
else C := B;
C = (A>B)? A : B;
Chap. 0 Introd. to Computer
5
개인용 컴퓨터의 규격
•
•
•
•
CPU
Memory
Secondary Storage
I/O Device
Chap. 0 Introd. to Computer
6
CPU
• Microprocessor
– 8088, 80286, 80386, 80486
– Pentium II, III, IV
– Celeron
• CPU의 속도
– MHz (650 MHz, 800 MHz, 1 GHz)
Chap. 0 Introd. to Computer
7
Memory
• Cache Memory
– 용량: 256 KB, 512 KB (L1 cache, L2 cache)
• DRAM
– Dynamic Random Access Memory - 휘발성
– 용량: 128 MB, 256 MB
– DIMM, SIMM
• ROM
– Read Only Memory (ROM BIOS) - 비휘발성
Chap. 0 Introd. to Computer
8
Secondary Storage
• Hard Disk
– Magnetic Storage
– Seek time + Rotational delay + Transfer time
– 용량: 20 GB, 30 GB
• CD-ROM
– 속도: 48배속, 용량: 650 MB (DVD: 4 GB)
• Floppy Disk
– 3.5” 2HD = 1.44 MB, ZIP: 100 MB
• Magnetic Tape
– Sequential Storage (DAT: 4GB ~ 8GB)
Chap. 0 Introd. to Computer
9
I/O Device
• Graphics Card  Video Adapter
– Pixel: 12801024 (640480, 1024768)
– Frame Buffer: 1028  1024  3B  8  32 MB
• Sound Card
– Analog to Digital Converter
• Modem: 56 Kbps
• Keyboard, Mouse
Chap. 0 Introd. to Computer
10