38 views

Uploaded by vito787

Assm13 Lecture 3 Register Transfer and Microoperations

save

- 74HCHCT153.pdf
- logic gates
- Basic Electronics .. Combinational Logic
- Wallace Tree Multiplier
- 74LS153.pdf
- 74HC_HCT153_CNV.pdf
- Lab00RT
- Copy of VLSI lab-2
- digital.pdf
- Combinational Circuits Part II
- Agard-Ag-183(Principles of Avionics Computer Systems)
- Hb 3212731278
- Scheme of Training Digital Eletronics
- Lab #09 10095 2011 V2
- Low Power ALU Cluster
- 1Accumulator Based 3-Weight
- Managing business
- Introduction to Computers
- Computers and Technology Vocabulary
- Getting Started With the Raspberry Pi TV HAT
- Computer Hardware
- Ch8 - Analog to Digital Converter
- IX Guess 2011
- Computer Knowledge
- Revised DOEACC A Level SYLLABUS
- Exercício de Inglês Instrumental
- IT and CS Assignment
- MPC5744P
- A1-R3 Syllabus
- 10.1.1.23
- chakuruma enchulao
- INFORME008-INGPEDROMONTOYAVÁSQUEZ.doc
- kd smk
- Riview
- Penjelasan Umum Payer AdMedika
- ANALITICO - 04 TRAMOS-----------
- TRANSFORMACION DE SOCIEDADES.docx
- 01_Pengenalan_Komputer.doc
- Aspnnnnpqqqqpp444pe
- sp_step3
- Log Book KP
- Cmori
- Conclusión Trayectorias Educativas
- asd
- Bangunan bangunan era Kolonialisme sangat banyak di Yogyakarta.docx
- 4609_MBA_02_08_2016
- ALTMANN, Walter (1983), Confrontacion y Liberacion. Una Perspectiva Latinoamericana Sobre Lutero
- 0719-2584-rchdt-6-02-00001.pdf
- Tumori Koze
- 78-0050 Operating Instructions
- Tipe Tipe Kopling Sepeda Motor
- Chemistry 9th Urdu Medium Textbook 2018
- anzdoc.com_tabel-1-komposisi-sekam-padi-suharno-dan-dtc-ipb-d.pdf
- The Presocratic World-Picture
- Tkp Atau Tsk Cpns
- DOJ Circular No. 61 Guidelines on Plea Bargaining.pdf
- e-call-letter-download-05-08-18.pdf
- Libro Balances Metalurgicos
- LKPP.pdf
- Evaluación en rehabilitación psicosocial.pdf

You are on page 1of 53

(Assembly Language)

Computer Architecture

Dr. Salma Hamdy

10/7/2013

s.hamdy@cis.asu.edu.eg

1

**Course Logistics – Textbook Outline
**

Chapter 1: Digital Logic Circuits Chapter 2: Digital Components Chapter 3: Data Representation Chapter 4: Register Transfer and Microoperations Chapter 5: Basic Computer Organization Chapter 6: Programming the Basic Computer Chapter 7: Microporgammed Control

Chapter 12: Memory Organization

Chapter 8: CPU

Chapter 11: I/O Organization

2

**Register Transfer and Microoperations
**

1. 2. 3. 4. Register Transfer Language Transfer (Register, Bus, Memory) Microoperations (Arithmetic , Logic, Shift) Arithmetic Logic Shift Unit

**1. Register Transfer Language
**

• Circuits IC components modules + data + control paths computer. • Microoperation: operations executed on data stored in registers (shift, clear, load, count). • Internal HW organization is best defined by specifying:

1. The set of registers and their functions. 2. The sequence of microoperations. 3. The control that initiates the sequence of microoperations.

10/7/2013 4

**1. Register Transfer Language – (cont.)
**

Register Transfer Language: the symbolic notation used to describe the microoperations transfer among registers • The use of symbols instead of a narrative explanation provides an organized and concise manner. • A convenient tool for describing the internal organization of digital computers in a concise and precise manner.

10/7/2013 5

– R1 (Processor Register). – PC (Program Counter). – IR (Instruction Register). 10/7/2013 6 .1. Register Transfer • Registers are designated by Capital Letters (sometimes followed by numerals): – MAR (Memory Address Register).

) • Register Transfer: Information transfer from one register to another in symbolic form: 𝑹𝟐 ← 𝑹𝟏 • Register transfer with control function: 𝑷: 𝑹𝟐 ← 𝑹𝟏 10/7/2013 7 .1. Register Transfer – (cont.

) • Register Transfer: Information transfer from one register to another in symbolic form: 𝑹𝟐 ← 𝑹𝟏 • Register transfer with control function: 𝑷: 𝑹𝟐 ← 𝑹𝟏 means if(𝑷) then (𝑹𝟐 ← 𝑹𝟏) 10/7/2013 8 . Register Transfer – (cont.1.

) • Two or more operations at the same time (during a common clock pules): 𝑷: 𝑹𝟐 ← 𝑹𝟏. Register Transfer – (cont.1. 𝑹𝟏 ← 𝑹𝟐 10/7/2013 9 .

3. Bus Transfer • Common Bus is a more efficient scheme for transferring information between registers in a multiple-register configuration. 10/7/2013 10 . • Control signals determine which register is selected. • A bus structure = a set of common lines one for each bit of a register.

• Size of multiplexer = number of registers. 10/7/2013 11 . Multiplexers • The multiplexers select the source register whose binary information is placed on the bus.3. Bus Transfer – (cont. • Number of multiplexers = size of register.) • Constructing a common bus is done with: 1.

3.) 10/7/2013 12 . Bus Transfer – (cont.

3. 𝑹𝟏 ← 𝑩𝑼𝑺 Bus 𝑹𝟏 Register 10/7/2013 n 𝑪 Register 13 .) • Constructing a common bus is done with: 1. Multiplexers • The content of register 𝑪 is placed on the bus. Bus Transfer – (cont. and the content of the bus is loaded into register 𝑹𝟏 by activating its load control input 𝑩𝑼𝑺 ← 𝑪.

eight 16-bit registers ? 10/7/2013 14 . • e. Bus Transfer – (cont. Multiplexers • In general a bus system will multiplex 𝒌 registers of 𝒏 bits to produce an 𝒏 -line common bus 𝒏 multiplexers of size 𝒌 × 𝟏.3.g.) • Constructing a common bus is done with: 1.

to prevent mixed interactions. high-impedance (open circuit).) • Constructing a common bus is done with: 2. 10/7/2013 15 . and to supply additional drive or relay capability.3. Three-State Bus Buffer • Tri-State: 0. 1. • Buffer: a device designed to be inserted between other devices to match impedance. Bus Transfer – (cont.

Bus Transfer – (cont.3. Three-State Bus Buffer • The outputs of the 𝒌 buffers are connected together to form a single bus line.) • Constructing a common bus is done with: 2. • No more than one buffer may be in the active state at any given time (how?) 10/7/2013 16 .

Three-State Bus Buffer • The outputs of the 𝒌 buffers are connected together to form a single bus line.3. 𝒎 • Size of decoder = 𝐦 × 𝒌 such that 𝟐 = 𝒌. • No more than one buffer may be in the active state at any given time decoder. • Number of decoders = size of registers = 𝒏.) • Constructing a common bus is done with: 2. Bus Transfer – (cont. 10/7/2013 17 .

Three-State Bus Buffer • Bit 0 for four registers: 10/7/2013 18 .3. Bus Transfer – (cont.) • Constructing a common bus is done with: 2.

• Memory read : transfer information into 𝑫𝑹 from the memory word 𝑴 selected by the address in 𝑨𝑹.4. Memory Transfer • Memory Unit is a collection of storage cells together with associated circuits needed to transfer information in and out of storage. 𝑹𝒆𝒂𝒅: 𝑫𝑹 ← 𝑴[𝑨𝑹] • Memory Write : transfer information from 𝑹𝟏 into the memory word 𝑴 selected by the address in 𝑨𝑹. 𝑾𝒓𝒊𝒕𝒆 𝑴 𝑨𝑹 ← 𝑹𝟏 10/7/2013 19 .

but much larger. 10/7/2013 20 . Binary information is made permanent during HW production.Used to store constant tables.4. .) . Memory Transfer – (cont. . programs that boot the computer and perform diagnostics usually small.Slower than registers.ROM: performs read operations only.RAM: can transfer the stored info out (read) and also receive new information in (write) any desired random location. .

Memory read enabled. Memory Transfer – (cont. . 10/7/2013 21 .4. • Read: .) • A memory unit that communicates with multiple registers.Word at address specified by chosen address register is loaded into register with enabled load input. • Left MUX decides which address register. • Decoder decides which destination register has an active load input.

4. . • Decoder decides which destination register has an active load input. Memory Transfer – (cont. • Write: . to memory at address specified by address 10/7/2013 register. • Left MUX decides which address register.) • A memory unit that communicates with multiple registers.Memory write enabled. 22 .Right MUX decides which destination register to transfer word from.

• All other microoperations change content during transfer. • The basic set of microoperations: – Arithmetic – Logic – Shift • Each have its symbolic hardware implementation.5. 10/7/2013 notation and 23 . Microoperations • Register transfer do not change binary info.

Arithmetic Microoperations • Basic arithmetic microoperation: – Add – Subtract – Complement – Shift • All other arithmetic microoperations can be obtained from a variation or a sequence of them.6. 10/7/2013 24 .

6.) • Basic arithmetic microoperation: 10/7/2013 25 . Arithmetic Microoperations – (cont.

10/7/2013 26 .) Binary Adder Hardware Implementation • Using full-adders connected in cascade.6. Arithmetic Microoperations – (cont.

6.) Binary Adder-Subtractor Hardware Implementation • Remember that 𝑨 − 𝑩 = 𝑨 + 𝟐′𝒔 𝒐𝒇 𝑩 = 𝑨 + 𝑩 + 𝟏 • Hence combine addition and subtraction in one circuit with a control input 𝑴. • 𝑴 = 𝟏 (add) • 𝑴 = 𝟎 (subtract) 10/7/2013 27 . Arithmetic Microoperations – (cont.

) Binary Adder-Subtractor Hardware Implementation • M = 0 : Adder B M + C = B 0 + 0 = B.B 10/7/2013 28 . Arithmetic Microoperations – (cont. A + B • M = 1 : Subtractor B M + C = B 1 + 1 = B’ + 1= -B(2’s comp). A .6.

Arithmetic Microoperations – (cont.) Binary Incrementer Hardware Implementation • Binary counter (previous lectures). 10/7/2013 29 . • Combinational circuits: – Half-adders connected in cascade.6. – Least significant adder have one input = 1.

Arithmetic Microoperations – (cont.6.) Binary Incrementer Hardware Implementation • Combinational circuits: – Half-adders connected in cascade. 10/7/2013 30 .

6. Arithmetic Microoperations – (cont. 10/7/2013 31 .) Arithmetic Circuit • Combining all listed microoperations in one composite circuit.

Arithmetic Microoperations – (cont.) Arithmetic Circuit A+1111=A-1 10/7/2013 A-1+1=A 32 .6.

Logic Microoperations • Logic microoperations consider each bit of the register separately and treat them as binary variables. 𝐏: 𝑹𝟏 ← 𝑹𝟏𝑹𝟐 1010 Content of 𝑹𝟏 1100 Content of 𝑹𝟐 0110 Content of 𝑹𝟏 after 𝑷 = 𝟏 10/7/2013 33 . • e. • Seldom used in scientific computations but very useful for bit manipulation and logical decisions.7.g.

10/7/2013 34 .g. 𝐑𝟒 ← 𝑹𝟓 𝑹𝟔 • Means: if(𝑷 OR 𝑸) then (add 𝑹𝟏 to 𝑹𝟐 and put the result in 𝑹𝟏. 𝐏 + 𝐐: 𝑹𝟏 ← 𝑹𝟐+𝑹𝟑. Logic Microoperations – (cont. • e. – In control (or Boolean) function == AND.7. not ( ) • The plus sign usage: – In microoperation == addition. or (). and perform 𝑹𝟓 OR 𝑹𝟔 and put the results in 𝑹𝟒).) • Symbolic notation: and ().

) 10/7/2013 35 . Logic Microoperations – (cont.7.

10/7/2013 36 . NOT) and derive the rest from them. OR. Logic Microoperations – (cont. XOR.7.) Hardware Implementation • Most computers use only four microoperations (AND.

10/7/2013 37 . NOT) and derive the rest from them.7. Logic Microoperations – (cont. XOR. OR.) Hardware Implementation • Most computers use only four microoperations (AND.

) Some applications • Manipulating individual bits or a portion of a word stored in a register • Change bit values.7. or insert new bit values. Logic Microoperations – (cont. delete a group of bits. 10/7/2013 38 .

1010 A before • Selective-complement A A B – Complements bits in A where there are corresponding 1’s in B. 1010 1100 B (Logic Operand) 10/7/2013 1100 B (Logic Operand) 1110 A After Selective-set 0110 A After 39 . It does not effect bit A before positions that have 0’s in B.7. It does not effect bit positions that have 0’s in B. Logic Microoperations – (cont.) Some applications • Selective-set A A B – Sets to 1 the bits in register A where there are corresponding 1’s in register B.

1010 A before 10/7/2013 1100 B (Logic Operand) 1000 A After 40 Selective-mask . Logic Microoperations – (cont. 1100 B (Logic Operand) 0010 A After Selective-clear • Selective-mask A A B – Similar to the selective-clear operation except that the bits of A are cleared only where there are corresponding 0’s in B.7.) Some applications • Selective-clear A A B – Clears to 0 the bits in A only where there are 1010 A before corresponding 1’s in B.

Logic Microoperations – (cont. – This is done by first masking the bits and then ORing them with the required value. 1) Mask 0110 1010 A before 0000 1111 B mask 0000 1010 A after mask 10/7/2013 2) OR 0000 1010 A before 1001 0000 B insert 1001 1010 A after insert 41 .) Some applications • Insert – The insert operation inserts a new value into a group of bits.7.

logic and data-processing operations. • Three types: – Logical – Circular – Arithmetic 10/7/2013 42 .8. • with conjunction with arithmetic. Shift Microoperations • Used for serial transfer of data.

• 𝑹𝟏 ← 𝒔𝒉𝒍 𝑹𝟏 • 𝑹𝟐 ← 𝒔𝒉𝒓 𝑹𝟐 0 0 10/7/2013 Register symbol must be the same on both sides of arrow 43 . • Shift-left or shift-right. • The bit transferred to the end position through the serial input is assumed to be 0 during a logical shift (zero inserted). Shift Microoperations Logical Shift • Transfers 0 through the serial input.8.

• 𝑹𝟏 ← 𝒄𝒊𝒍 𝑹𝟏 • 𝑹𝟐 ← 𝒄𝒊𝒓 𝑹𝟐 10/7/2013 Register symbol must be the same on both sides of arrow 44 . Shift Microoperations Circular Shift • Shift-left or shift-right. • The circular shift circulates the bits of the register around the two ends without loss of information.8.

10/7/2013 45 .8. Shift Microoperations Arithmetic Shift • Shifts a signed binary number to left or right • Shift-left == multiplication by 2. • Must leave the sign bit unchanged because the sign of the number remains the same. • Shift-right == division by 2.

10/7/2013 46 .. . Shift Microoperations Arithmetic Shift • Shift-left Carry out Sign bit Rn-1 Rn-2 MSB R2 ashl R2 0 insert .. R1 LSB R0 • Shift-right MSB R2 ashr R2 LSB lost LSB • Sign reversal occurs with overflow detect with FF.8..

to shifter. 10/7/2013 47 . • Combinational circuit – More efficient. – n-bit shifter == n multiplexers. – Register on common bus.8. – Only one clock pulse to load and shift. – MUX to decided shift type. Shift Microoperations Hardware Implementation • Bidirectional shift register with parallel load (previous lectures). back to register.

8. Shift Microoperations Hardware Implementation • A 4-bit Combinational shifter 10/7/2013 48 .

Arithmetic Logic Shift Unit • Instead of individual registers performing microoperation storage registers + ALU. 10/7/2013 49 . • ALU is combinational one clock pulse to complete task. • MUX to choose between logical and arithmetic operations outputs.9.

Arithmetic Logic Shift Unit – (cont.) Hardware Implementation • One stage of Arithmetic Logic Shift Unit. 10/7/2013 50 .9.

Selected Problems • To be selected! 10/7/2013 51 .

10/7/2013 52 . Assignment .Next Lecture Basic Computer Organization and Design.Reading: Chapter 4.

Prentice Hall.kr/ ch04 . M. Morris Mano.God bless Google and Wiki! 10/7/2013 53 . -http://microcom.kut. 2006.References .Digital Design.ac. 4th ed.

- 74HCHCT153.pdfUploaded byCesar Villeda
- logic gatesUploaded byAsutosh Das
- Basic Electronics .. Combinational LogicUploaded byabdullah1s
- Wallace Tree MultiplierUploaded byvarun186
- 74LS153.pdfUploaded byAnonymous o7WTkbq8b
- 74HC_HCT153_CNV.pdfUploaded bypawan_32
- Lab00RTUploaded byCarlos Morales Carbajal
- Copy of VLSI lab-2Uploaded byGowtham Sp
- digital.pdfUploaded bythumatimadhusudhan
- Combinational Circuits Part IIUploaded bychans08
- Agard-Ag-183(Principles of Avionics Computer Systems)Uploaded byΑΛΕΞΑΝΔΡΟΣ ΤΖΑΒΕΛΛΑΣ
- Hb 3212731278Uploaded byAnonymous 7VPPkWS8O
- Scheme of Training Digital EletronicsUploaded bysupiriman
- Lab #09 10095 2011 V2Uploaded byryan0995
- Low Power ALU ClusterUploaded byRenju Tj
- 1Accumulator Based 3-WeightUploaded byramu_scribd
- Managing businessUploaded byRewardMaturure
- Introduction to ComputersUploaded byapi-3723664
- Computers and Technology VocabularyUploaded byMarijan Bozickovic
- Getting Started With the Raspberry Pi TV HATUploaded byXurxo Carracedo
- Computer HardwareUploaded byAshwitha Nailesh
- Ch8 - Analog to Digital ConverterUploaded byEdward Conal
- IX Guess 2011Uploaded bySunnycandoeverything
- Computer KnowledgeUploaded bySanthosh Kumar Netheti
- Revised DOEACC A Level SYLLABUSUploaded byharvinder thukral
- Exercício de Inglês InstrumentalUploaded byDiana Santos
- IT and CS AssignmentUploaded byschawinga
- MPC5744PUploaded byJose Benavides
- A1-R3 SyllabusUploaded byapi-3782519
- 10.1.1.23Uploaded byViji Vasan