Note that none of the above MAY be a VALID ANSWER.

Similar documents
*Instruction Matters: Purdue Academic Course Transformation. Introduction to Digital System Design. Module 4 Arithmetic and Computer Logic Circuits

REGISTER TRANSFER LANGUAGE

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

SCRAM Introduction. Philipp Koehn. 19 February 2018

Assembly Language Programming of 8085

CPU Design John D. Carpinelli, All Rights Reserved 1

THE MICROPROCESSOR Von Neumann s Architecture Model

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

COMPUTER ORGANIZATION

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

REGISTER TRANSFER AND MICROOPERATIONS

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

session 7. Datapath Design

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

ECE 341 Midterm Exam

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Darshan Institute of Engineering & Technology for Diploma Studies Unit - 1

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

Chapter. Computer Architecture

Computer Architecture

To design a 4-bit ALU To experimentally check the operation of the ALU

Real Digital Problem Set #6

Chapter 10 - Computer Arithmetic

REGISTER TRANSFER AND MICROOPERATIONS

Computer Architecture and Organization: L04: Micro-operations

Digital System Design Using Verilog. - Processing Unit Design

CHAPTER 8: Central Processing Unit (CPU)

Microcomputer Architecture and Programming

CPE300: Digital System Architecture and Design

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)

Computer Organization and Design

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

Unit II Basic Computer Organization

CHAPTER 4: Register Transfer Language and Microoperations

Computer Architecture Programming the Basic Computer

The functional block diagram of 8085A is shown in fig.4.1.

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

CSE140 L. Instructor: Thomas Y. P. Lee. March 1, Agenda. Computer System Design. Computer Architecture. Instruction Memory design.

ECE331: Hardware Organization and Design

Design of Embedded DSP Processors

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

5-1 Instruction Codes

Microcontroller Systems

Assembly Language Programming of 8085

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Register Transfer and Micro-operations

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 11 Instruction Sets: Addressing Modes and Formats

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

ASSEMBLY LANGUAGE MACHINE ORGANIZATION

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

Register Transfer Language and Microoperations (Part 2)

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

Microcomputers. Outline. Number Systems and Digital Logic Review

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

Blog -

Chapter 2 Instruction Set Architecture

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Chapter 4. The Processor

PSIM: Processor SIMulator (version 4.2)


Parallel logic circuits

Blog -


Chapter 7 Central Processor Unit (S08CPUV2)

Computer Architecture

Processing Unit CS206T

William Stallings Computer Organization and Architecture

8085 INSTRUCTION SET INSTRUCTION DETAILS

Lab Assignment 1. Developing and Using Testbenches

Chapter 3: part 3 Binary Subtraction

Computer Organization

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

BASIC COMPUTER ORGANIZATION AND DESIGN

9/25/ Software & Hardware Architecture

CISC Processor Design


COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

Computer Organization (Autonomous)

Lecture Topics. Announcements. Today: Integer Arithmetic (P&H ) Next: continued. Consulting hours. Introduction to Sim. Milestone #1 (due 1/26)

Chapter 3 : Control Unit

Intel 8086 MICROPROCESSOR. By Y V S Murthy

PROBLEMS. 7.1 Why is the Wait-for-Memory-Function-Completed step needed when reading from or writing to the main memory?

ECE331: Hardware Organization and Design

The Itanium Bit Microprocessor Report

CSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1

BASIC COMPUTER ORGANIZATION AND DESIGN

Grundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

Instruction set of 8085

Transcription:

ECE 270 Learning Outcome 4-1 - Practice Exam / Solution OUTCOME #4: An ability to design and implement computer logic circuits. Multiple Choice select the single most appropriate response for each question. Note that none of the above MAY be a VALID ANSWER. 1. The five-bit sign and magnitude number, SM(10101)2, converted to radix notation, is: (A) R (10101)2 (B) R (01010)2 (C) R (11010)2 (D) R (11011)2 2. When subtracting the five-bit signed numbers (10111)2 (11001)2 using radix arithmetic, the result obtained is: (A) (01110)2 (B) (11111)2 (C) (11110)2 (D) overflow (invalid result) 3. The number of diagonals of full adder cells required to implement a 5x3 unsigned binary multiplier is: (A) 3 (B) 4 (C) 5 (D) 6 (E) none of these 4. The total number of full adder cells required to implement a 5x3 unsigned binary multiplier is: (A) 8 (B) 10 (C) 12 (D) 24 5. If an N-nanosecond PLD were used to generate each product component bit (using a separate macrocell for each product component bit), and implement each full adder cell (using a pair of macrocells to implement each full adder cell), the worst case propagation delay of a 5x3 unsigned binary multiplier array would be: (A) 7N (B) 8N (C) 9N (D) 10N

ECE 270 Learning Outcome 4-2 - Practice Exam / Solution The following Verilog module applies to questions 6-8: /* 4-bit Carry Look-Ahead Adder Block Practice Exam Version */ module cla4pe(x, Y, CIN, C, S); input wire [3:0] X, Y; input wire CIN; output wire [3:0] C; output wire [3:0] S; // Operands // Carry in // Carry equations (C[3] is Cout) // Sum outputs wire [3:0] G, P; // Generate functions assign G = X & Y; // Propagate functions assign P = X ^ Y; // Carry equations assign C[0] = G[0] CIN&P[0]; assign C[1] = G[1] G[0]&P[1] CIN&P[0]&P[1]; assign C[2] = G[2] G[1]&P[2] G[0]&P[1]&P[2] CIN&P[0]&P[1]&P[2]; assign C[3] = G[3] G[2]&P[3] G[1]&P[2]&P[3] G[0]&P[1]&P[2]&P[3] CIN&P[0]&P[1]&P[2]&P[3]; // Sum equations assign S[0] = CIN ^ P[0]; assign S[3:1] = C[2:0] ^ P[3:1]; endmodule 6. If realized as coded above, the number of product terms required to implement the equation for C[0] would be: (A) 3 (B) 4 (C) 7 (D) 10 7. If realized as coded above, the number of product terms required to implement the equation for C[1] would be: (A) 3 (B) 4 (C) 7 (D) 10 8. If realized as coded above, the number of product terms required to implement the equation for S[1] would be: (A) 3 (B) 4 (C) 7 (D) 10

ECE 270 Learning Outcome 4-3 - Practice Exam / Solution The following chart applies to questions 9-11: A1 A0 (A) B1 B0 (B)? C Z N V 0 0 0 0 0 0 (A) = (B) 1 1 0 0 0 0 0 0 1 +1 (A) < (B) 0 0 1 0 0 0 0 1 0-2 (A) > (B) 0 0 1 1 0 0 0 1 1-1 (A) > (B) 0 0 0 0 0 1 +1 0 0 0 (A) > (B) 1 0 0 0 0 1 +1 0 1 +1 (A) = (B) 1 1 0 0 0 1 +1 1 0-2 (A) > (B) 0 0 1 1 0 1 +1 1 1-1 (A) > (B) 0 0 1 1 1 0-2 0 0 0 (A) < (B) 1 0 1 0 1 0-2 0 1 +1 (A) < (B) 1 0 0 1 1 0-2 1 0-2 (A) = (B) 1 1 0 0 1 0-2 1 1-1 (A) < (B) 0 0 1 0 1 1-1 0 0 0 (A) < (B) 1 0 1 0 1 1-1 0 1 +1 (A) < (B) 1 0 1 0 1 1-1 1 0-2 (A) > (B) 1 0 0 0 1 1-1 1 1-1 (A) = (B) 1 1 0 0 9. The function for A equals B (FA=B) can be expressed as: (A) FA=B = C (B) FA=B = Z (C) FA=B = N (D) FA=B = V 10. The function for A less than B (FA<B) can be expressed as: (A) FA<B = Z + N V + N V (B) FA<B = N V + N V (C) FA<B = N V + N V (D) FA<B = Z + N V + N V 11. The function for A greater than or equal to B (FA B) can be expressed as: (A) FA B = Z + N V + N V (B) FA B = N V + N V (C) FA B = N V + N V (D) FA B = Z + N V + N V

ECE 270 Learning Outcome 4-4 - Practice Exam / Solution The following block diagram of a BCD full adder cell applies to questions 12-14: X3 X2 X1 X0 Y3 Y2 Y1 Y0 Cout 4-bit Adder Cin S3 S2 S1 S0 Z4 Z3 Z2 Z1 Z0 Correction Circuit Cout S3 S2 S1 S0 12. The purpose of the correction circuit is to: (A) always add (0110)2 to the direct sum (Z3 Z2 Z1 Z0) (B) add (0110)2 to the direct sum (Z3 Z2 Z1 Z0) only if Z4=1 (C) always subtract (0110)2 from the direct sum (Z3 Z2 Z1 Z0) (D) add (0110)2 to the direct sum (Z3 Z2 Z1 Z0) only if Z4+Z3 Z2+Z3 Z1=1 13. If X3..X0 = 0111, Y3..Y0 = 0011, and Cin = 1, the value input to the correction circuit (Z4 Z3 Z2 Z1 Z0) will be: (A) 0 1 0 1 0 (B) 0 1 0 1 1 (C) 1 0 0 0 0 (D) 1 0 0 0 1 14. If X3..X0 = 0111, Y3..Y0 = 0011, and Cin = 1, the value output by the correction circuit (Cout S3 S2 S1 S0) will be: (A) 0 1 0 1 0 (B) 0 1 0 1 1 (C) 1 0 0 0 0 (D) 1 0 0 0 1

ECE 270 Learning Outcome 4-5 - Practice Exam / Solution 15. As observed in Lab 13, incrementing the program counter (PC) on the same clock edge that loads the instruction register (IR) does not cause a problem because: (A) the memory will ignore the new address the PC places on the address bus (B) the output buffers in the PC will not allow the new PC value to affect the address bus until the next fetch cycle (C) the IR will be loaded with the value on the data bus prior to the clock edge while the contents of the PC will increment after the clock edge (D) the value in the PC will change in time for the correct value to be output on the address bus (and fetch the correct instruction), before the IR load occurs 16. If a program contains more PSH instructions than POP instructions, the following is likely to occur: (A) stack underflow (stack collides with beginning of program space) (B) stack overflow (stack collides with end of program space) (C) program counter overflow (program counter wraps to beginning of program space) (D) program counter underflow (program counter wraps to end of program space) 17. Whether or not a conditional branch is taken or not taken depends on: (A) the value of the program counter (B) the state of the condition code bits (C) the cycle of the state counter (D) the value in the accumulator 18. The state counter in the extended machine s instruction decoder and microsequencer needs both a synchronous reset (RST) and an asynchronous reset (ARS) because: (A) we want to make sure the state counter gets reset (B) the ARS signal allows the state counter to be reset to the fetch state when START is pressed, while the RST allows the state counter to be reset when the last execute cycle of an instruction is reached (C) the RST signal allows the state counter to be reset to the fetch state when START is pressed, while ARS allows the state counter to be reset when the last execute cycle of an instruction is reached (D) the state counter is not always clocked 19. When a set of control signals are said to be mutually exclusive, it means that: (A) all the control signals may be asserted simultaneously (B) only one control signal may be asserted at a given instant (C) each control signal is dependent on the others (D) any combination of control signals may be asserted at a given instant

ECE 270 Learning Outcome 4-6 - Practice Exam / Solution Figure 1 on the attached Reference Sheets applies to questions 20 through 22. 20. If the input control combination AOE=0, ALE=1, ALX=0, ALY=0 is applied to this circuit, the function performed will be: (A) ADD (B) SUBTRACT (C) LOAD (D) NEGATE 21. If the input control combination AOE=0, ALE=1, ALX=1, ALY=0 is applied to this circuit, the function performed will be: (A) ADD (B) SUBTRACT (C) LOAD (D) NEGATE 22. If the input control combination AOE=1, ALE=1, ALX=1, ALY=1 is applied to this circuit, the function (inadvertently) performed on (A) will be equivalent to a: (A) logical left shift (B) logical right shift (C) rotate left (D) rotate right Figure 2 on the attached Reference Sheets applies to questions 23 through 25. 23. When the program stops ( halts ), the value in the A register will be: (A) 0100 1100 (B) 1000 0000 (C) 0000 0000 (D) 0100 0011 24. When the program stops ( halts ), the condition code bits will be: (A) CF = 0, NF = 0, VF = 0, ZF = 0 (B) CF = 1, NF = 1, VF = 0, ZF = 0 (C) CF = 0, NF = 1, VF = 1, ZF = 0 (D) CF = 1, NF = 0, VF = 0, ZF = 1 25. When the program stops ( halts ), the value in the program counter will be: (A) 00000 (B) 00110 (C) 00111 (D) 01111

ECE 270 Learning Outcome 4-7 - Practice Exam / Solution Figure 3 on the attached Reference Sheets applies to questions 26 through 30. NOTE: If there is only one execute state, then first execute state last execute state. 26. The following control signal is not asserted on a fetch cycle: (A) IRA (B) IRL (C) PCC (D) POA 27. Assuming a standard stack convention (in which the SP register points to the top stack item), the following SP control signal(s) will be asserted on the first execute cycle of a JSR instruction: (A) SPI (B) SPD (C) SPI and SPA (D) SPD and SPA 28. Assuming a standard stack convention (in which the SP register points to the top stack item), the following PC control signal will be asserted on the last execute cycle of a JSR instruction: (A) POA (B) POD (C) PLA (D) PLD 29. Assuming a standard stack convention (in which the SP register points to the top stack item), the following SP control signal(s) will be asserted on the first execute cycle of an RTS instruction: (A) SPI (B) SPD (C) SPI and SPA (D) SPD and SPA 30. Assuming a standard stack convention (in which the SP register points to the top stack item), the following PC control signal will be asserted on the last execute cycle of an RTS instruction: (A) POA (B) POD (C) PLA (D) PLD

ECE 270 Learning Outcome 4-8 - Practice Exam / Solution Qi- Q2 Q1 Q0 Q0 ALY ALY i 0 A1 A0 2:1 mux F X Y Full Adder Cout S Cin C 2 C 3 ALX i 0 A1 A0 2:1 mux F D Q Q3 AOE DB 3 CLOCK ALE i 0 A1 A0 2:1 mux F Figure 1. Block Diagram for Bit 3 of a Simple Computer ALU (applies to questions 20 through 22).

ECE 270 Learning Outcome 4-9 - Practice Exam / Solution Opcode Mnemonic Function Performed CC Affected 0 0 0 ADD addr Add contents of addr to contents of A CF, NF, VF, ZF 0 0 1 SUB addr Subtract contents of addr from contents of A CF, NF, VF, ZF 0 1 0 LDA addr Load A with contents of location addr NF, ZF 0 1 1 XOR addr XOR contents of addr with contents of A NF, ZF 1 0 0 STA addr Store contents of A at location addr none 1 0 1 HLT Halt Stop, discontinue execution none Figure 2. Simple Computer Instruction Set, Block Diagram, and Memory Contents (applies to questions 23 through 25).

ECE 270 Learning Outcome 4-10 - Practice Exam / Solution Instruction Set: Opcode Mnemonic Description Opcode Mnemonic Description 0 0 0 HLT Stop execution 1 0 0 ADD addr (A) (A)+(addr) 0 0 1 LDA addr (A) (addr) 1 0 1 SUB addr (A) (A) (addr) 0 1 0 STA addr (addr) (A) 1 1 0 JSR addr Call subroutine at location addr 0 1 1 ASR Arithmetic Shift Return from 1 1 1 RTS Right (A) subroutine ALU Function Table: AOE ALE ALX ALY Function CF ZF NF VF 0 1 0 0 Add X X X X 0 1 0 1 Subtract X X X X 0 1 1 0 Load X X 0 1 1 1 Arithmetic Shift Right* X X X 1 0 d d Output 0 0 d d <none> X flag affected, flag not affected *For Arithmetic Shift Right, CF = bit shifted out of accumulator Signal Names: Name Description START Asynchronous Machine Reset MSL Memory Select MOE Memory Output Tri-State Enable MWE Memory Write Enable PCC Program Counter Count Enable POA Program Counter Output on Address Bus Tri-State Enable PLA Program Counter Load from Address Bus Enable POD Program Counter Output on Data Bus Tri-State Enable PLD Program Counter Load from Data Bus Enable IRL Instruction Register Load Enable IRA Instruction Register Output on Address Bus Tri-State Enable AOE A-register Output on Data Bus Tri- State Enable ALE ALU Function Enable ALX ALU Function Select Line X ALY ALU Function Select Line Y SPI Stack Pointer Increment SPD Stack Pointer Decrement SPA Stack Pointer Output on Address Bus Tri-State Enable RST Synchronous State Counter Reset RUN Machine Run Enable Block Diagram: Instruction Decoder and Micro-Sequencer Start Clock Flags ALU Data Opcode Address Instruction Register Data Bus Data Program Counter SP Memory Address Address Bus Figure 3. Simple 8-bit Computer Instruction Set, Signal Names, and Block Diagram (applies to questions 26 through 30).