Upload presentasi
Presentasi sedang didownload. Silahkan tunggu
Diterbitkan olehGlenna Ratna Sudjarwadi Telah diubah "9 tahun yang lalu
1
1 Pertemuan 3 Instruksi Mesin dan Program: I Matakuliah: T0324 / Arsitektur dan Organisasi Komputer Tahun: 2005 Versi: 1
2
2 Learning Outcomes Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Menjelaskan prinsip kerja instruksi mesin dan konsep representasi bilangan ( C2 ) ( No TIK : 2 )
3
3 Chapter 2. Numbers, Arithmetic Operations, and Characters
4
4 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1+ 1- 2+ 3+ 4+ 5+ 6+ 7+ 2- 3- 4- 5- 6- 7- 8- 0+ 0- 1+ 2+ 3+ 4+ 5+ 6+ 7+ 0+ 7- 6- 5- 4- 3- 2- 1- 0- 1+ 2+ 3+ 4+ 5+ 6+ 7+ 0+ 7- 6- 5- 4- 3- 2- 1- b 3 b 2 b 1 b 0 Sign and magnitude 1's complement2's complement BValues represented Figure 2.1. Binary, signed-integer representations.
5
5 Figure 2.2. Addition of 1-bit numbers. Carry-out 1 1 + 011 0 1+ 0 0 0 + 1 0 1 +
6
6 N2- N1- 0 1 2 (a) Circle representation of integers mod N 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 1+1- 2+ 3+ 4+ 5+ 6+ 7+ 2- 3- 4- 5- 6- 7- 8- 0 (b) Mod 16 system for 2 ' s-complement numbers Figure 2.3. Modular number systems and the 2's-complement system.
7
7 + + + + + + + + + + - - - - - - (a) (c) (b) (d) (e) (f) (g) (h) (i) (j) Figure 2.4. 2's-complement Add and Subtract operations.
8
8 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1+ 1- 2+ 3+ 4+ 5+ 6+ 7+ 2- 3- 4- 5- 6- 7- 8- 0+ 0- 1+ 2+ 3+ 4+ 5+ 6+ 7+ 0+ 7- 6- 5- 4- 3- 2- 1- 0- 1+ 2+ 3+ 4+ 5+ 6+ 7+ 0+ 7- 6- 5- 4- 3- 2- 1- b 3 b 2 b 1 b 0 Sign and magnitude 1's complement2's complement BValues represented
9
9 + + + + + + + + + + - - - - - - (a) (c) (b) (d) (e) (f) (g) (h) (i) (j) Figure 2.4. 2's-complement Add and Subtract operations.
10
10 second word first word Figure 2.5. Memory words. n bits last word i th word
11
11 R0,C B,R0 A,R0 Move i + 8 Begin execution hereMove i ContentsAddress C B A the program Data for segment program 3-instruction Add i + 4 Figure 2.8. A program for C + A simple program doing the basic arithmetic expression C = A + B; Note the simple instructions: Move and Add and that data is stored with the instructions.
12
12 N,R1Move NUMn NUM2 NUM1 R0,SUM R1 "Next" number to R0 LOOP Decrement Move LOOP loop Program Determine address of "Next" number and add N SUM n R0Clear Branch>0 A branch or looping program. Two new instructions Branch and Decrement.
Presentasi serupa
© 2024 SlidePlayer.info Inc.
All rights reserved.