Section 001. Read this before starting!

Similar documents
Section 002. Read this before starting!

Section 001. Read this before starting!

Section 001 & 002. Read this before starting!

Read this before starting!

Section 001. Read this before starting! You may use one sheet of scrap paper that you will turn in with your test.

Read this before starting!

Read this before starting!

Read this before starting!

Section 001. Read this before starting!

Read this before starting!

Read this before starting!

Read this before starting!

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2006

Read this before starting!

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 3 for Fall Semester, 2005

East Tennessee State University Department of Computer and Information Sciences CSCI 4717 Computer Architecture TEST 2 for Fall Semester, 2007

CHAPTER SEVENTEEN Assemblers versus Compilers. Intel 80x86 Assembly Language

Ex: Write a piece of code that transfers a block of 256 bytes stored at locations starting at 34000H to locations starting at 36000H. Ans.

Read this before starting!

Read this before starting!

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

Ex : Write an ALP to evaluate x(y + z) where x = 10H, y = 20H and z = 30H and store the result in a memory location 54000H.

East Tennessee State University Department of Computer and Information Sciences CSCI 1710/Section 001 Web Design I TEST 1 for Fall Semester, 2000

BAHAR DÖNEMİ MİKROİŞLEMCİLER LAB4 FÖYÜ

Arithmetic and Logic Instructions And Programs

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

Intel 8086 MICROPROCESSOR ARCHITECTURE

9/25/ Software & Hardware Architecture

LABORATORY WORK NO. 7 FLOW CONTROL INSTRUCTIONS

Chapter 12. Selected Pentium Instructions

Intel 8086 MICROPROCESSOR. By Y V S Murthy

IFE: Course in Low Level Programing. Lecture 6

8086 INSTRUCTION SET

Read this before starting!

If a b or a c, then a bc If a b and b c, then a c Every positive integer n > 1 can be written uniquely as n = p 1 k1 p 2 k2 p 3 k3 p 4 k4 p s

Signed number Arithmetic. Negative number is represented as

Selection and Iteration. Chapter 7 S. Dandamudi

Lecture 9. INC and DEC. INC/DEC Examples ADD. ADD Examples SUB. INC adds one to a single operand DEC decrements one from a single operand

Q1: Multiple choice / 20 Q2: Protected mode memory accesses

Week /8086 Microprocessor Programming

Logic Instructions. Basic Logic Instructions (AND, OR, XOR, TEST, NOT, NEG) Shift and Rotate instructions (SHL, SAL, SHR, SAR) Segment 4A

It is possible to define a number using a character or multiple numbers (see instruction DB) by using a string.

Read this before starting!

Intel Instruction Set (gas)

CC411: Introduction To Microprocessors

Intel 8086: Instruction Set

Marking Scheme. Examination Paper. Module: Microprocessors (630313)

Computer Architecture..Second Year (Sem.2).Lecture(4) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

SOEN228, Winter Revision 1.2 Date: October 25,

mith College Computer Science CSC231 Assembly Week #9 Spring 2017 Dominique Thiébaut

Read this before starting!

CSC 2400: Computer Systems. Towards the Hardware: Machine-Level Representation of Programs

8088/8086 Programming Integer Instructions and Computations

CSC 8400: Computer Systems. Machine-Level Representation of Programs

CSE351 Spring 2018, Midterm Exam April 27, 2018

SPRING TERM BM 310E MICROPROCESSORS LABORATORY PRELIMINARY STUDY

EC 333 Microprocessor and Interfacing Techniques (3+1)

Summer 2003 Lecture 4 06/14/03

8086 Programming. Multiplication Instructions. Multiplication can be performed on signed and unsigned numbers.

Chapter 5. Real-Mode 80386DX Microprocessor Programming 1 Part 2. The 80386, 80486, and Prentium Processors,Triebel Prof. Yan Luo, UMass Lowell 1

Lab 6: Conditional Processing

Basic Assembly SYSC-3006

Introduction to Microprocessor

3.1 DATA MOVEMENT INSTRUCTIONS 45

Read this before starting!

Read this before starting!

CMSC 313 Lecture 05 [draft]

8086 INTERNAL ARCHITECTURE

Lecture (08) x86 programming 7

X86 Addressing Modes Chapter 3" Review: Instructions to Recognize"

PESIT Bangalore South Campus

Jones & Bartlett Learning, LLC NOT FOR SALE OR DISTRIBUTION 80x86 Instructions

Computer Organization & Assembly Language Programming. CSE 2312 Lecture 15 Addressing and Subroutine

APPENDIX C INSTRUCTION SET DESCRIPTIONS

complement) Multiply Unsigned: MUL (all operands are nonnegative) AX = BH * AL IMUL BH IMUL CX (DX,AX) = CX * AX Arithmetic MUL DWORD PTR [0x10]

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

An Introduction to x86 ASM

Lab 3. The Art of Assembly Language (II)

icroprocessor istory of Microprocessor ntel 8086:

Arithmetic Instructions

Chapter Four Instructions Set

Basic Assembly Instructions

CS401 Assembly Language Solved MCQS From Midterm Papers

Chapter 6 (Part a) Conditional Processing

Branching and Looping

EXPERIMENT WRITE UP. LEARNING OBJECTIVES: 1. Get hands on experience with Assembly Language Programming 2. Write and debug programs in TASM/MASM

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

MICROPROCESSOR PROGRAMMING AND SYSTEM DESIGN

CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART

Logical and Bit Operations. Chapter 8 S. Dandamudi

Marking Scheme. Examination Paper Department of CE. Module: Microprocessors (630313)

Code segment Stack segment

Logical and bit operations

CS-202 Microprocessor and Assembly Language

Conditional Processing

ADVANCE MICROPROCESSOR & INTERFACING

Internal architecture of 8086

THE UNIVERSITY OF TRINIDAD & TOBAGO

Assembly Language LAB

x64 Cheat Sheet Fall 2014

Transcription:

Points missed: Student's Name: Total score: /100 points East Tennessee State University -- Department of Computer and Information Sciences CSCI 2150 Computer Organization Final Exam for Spring Semester, 2002 Instructor: David Tarnoff Section 001 Read this before starting! The total possible score for this test is 100 points. This test is closed book and closed notes All answers must be placed in blanks provided. Failure to do so will result in no credit for answer. 1 point will be deducted per answer for missing or incorrect units when required. No assumptions will be made for hexadecimal versus decimal, so you should always include the base in your answer. If you perform work on the back of a page in this test, indicate that you have done so in case the need arises for partial credit to be determined. Calculators are not allowed. Use the tables below for any conversions you may need. Leaving numeric equations is fine too. You may use one sheet of scrap paper that you will turn in with your test. Binary Hex Binary Hex Power of 2 Equals 0000 0 1000 8 2 3 8 0001 1 1001 9 2 4 16 0010 2 1010 A 2 5 32 0011 3 1011 B 2 6 64 0100 4 1100 C 2 7 128 0101 5 1101 D 2 8 256 0110 6 1110 E 2 9 512 0111 7 1111 F 2 10 1K Fine print The following is from section 5.7 "Academic Misconduct" of the ETSU Faculty Handbook, June 1, 2001: "Academic misconduct will be subject to disciplinary action. Any act of dishonesty in academic work constitutes academic misconduct. This includes plagiarism, the changing or falsifying of any academic documents or materials, cheating, and the giving or receiving of unauthorized aid in tests, examinations, or other assigned school work. Penalties for academic misconduct will vary with the seriousness of the offense and may include, but are not limited to: a grade of 'F' on the work in question, a grade of 'F' of the course, reprimand, probation, suspension, and expulsion. For a second academic offense the penalty is permanent expulsion."

DEC - Decrement Usage: DEC dest Modifies flags: AF OF PF SF ZF Description: Unsigned binary subtraction of one from the destination. INC - Increment Usage: INC dest Modifies flags: AF OF PF SF ZF Description: Adds one to destination unsigned binary operand. Jxx - Jump Instructions Table Mnemonic Meaning Jump Condition JE Jump if Equal ZF=1 JG Jump if Greater (signed) ZF=0 and SF=OF JGE Jump if Greater or Equal (signed) SF=OF JL Jump if Less (signed) SF!= OF JLE Jump if Less or Equal (signed) ZF=1 or SF!= OF JMP Unconditional Jump unconditional JNA Jump if Not Above CF=1 or ZF=1 JNB Jump if Not Below CF=0 JNE Jump if Not Equal ZF=0 JNG Jump if Not Greater (signed) ZF=1 or SF!= OF JNL Jump if Not Less (signed) SF=OF JZ Jump if Zero ZF=1 MOV - Move Byte or Word Usage: MOV dest,src Description: Copies byte or word from the "src" operand to the "dest" operand. NOT - One's Compliment Negation (Logical NOT) Usage: NOT dest Description: Inverts the bits of the "dest" operand forming the 1s complement. POP - Pop Word off Stack Usage: POP dest Description: Transfers word at the current stack top (SS:SP) to the destination then increments SP by two to point to the new stack top. CS is not a valid destination. PUSH - Push Word onto Stack Usage: PUSH src Description: Decrements SP by the size of the operand (two or four, byte values are sign extended) and transfers one word from source to the stack top (SS:SP). SAL/SHL - Shift Arithmetic Left / Shift Logical Left Usage: SAL dest,count SHL dest,count Modifies flags: CF OF PF SF ZF (AF undefined) Description: Shifts the destination left by "count" bits with zeroes shifted in on right. The Carry Flag contains the last bit shifted out. SAR - Shift Arithmetic Right Usage: SAR dest,count Modifies flags: CF OF PF SF ZF (AF undefined) Description: Shifts the destination right by "count" bits with the current sign bit replicated in the leftmost bit. The Carry Flag contains the last bit shifted out.

1.) Fill in the table below for each register named. Points will be lost if your purpose/description is not specific enough. Include name of other register(s) that each register is commonly paired with. (8 points) Register # of bits Purpose/description IP DH CS DI 2.) For each of the assembly language commands below, identify the instruction modes of first and second operands (first being the one to the left of the comma) as C-constant, R-register, or A-address. (6 points) mov ax,ds mov [ax+2],54h jmp 4567h sal bh,3 mov [bx+2],[1234h] 1 st operand 2 nd operand 3.) For each of the assembly language commands below, what is the boolean value for the active low signals ^MRDC, ^MWTC, ^IORC, and ^IOWC. (4 points) in ah,5674h mov [1234h],54h mov ax,[bx] out 4af5h,bh ^MRDC ^MWTC ^IORC ^IOWC 4.) Assume that before each of the following instructions, AX=C37Fh. What will ZF, SF, and CF equal after executing each instruction? IMPORTANT: Note that these instructions are not executed in a sequence. Each instruction assumes AX=C37Fh. Leave the flag blank if it is not affected by the instruction. Instruction Zero Flag Sign Flag Carry Flag inc al not ax sar ax,3 sal al,1 5.) If I wanted to toggle bit positions 7, 6, 1, and 0 of an 8-bit value, what bit-wise operation and corresponding bit mask would I use? Operation: (1 point) Mask: 6.) What would the result be if the binary value 01101010b was ANDed bit-wise with the binary value 11110000b? (3 points) 7.) What would be the absolutely quickest way to multiply a register by 8 without using the MULT command? (3 points)

8.) Of the following jump instructions, indicate which ones will jump to the address LOOP, which ones will simply execute the next address (i.e., not jump), and which ones you don't have enough information to tell. Instruction Current Flags Jump to LOOP Not jump to LOOP Cannot be determined JNL LOOP SF=0, ZF=1, OF=0 JNA LOOP SF=1, ZF=0 JG LOOP SF=0, ZF=0, OF=0 JLE LOOP ZF=0, SF=0, OF=1 9.) Assume the register BX contains the value 2000h and the table to the right represents the contents of a short portion of memory. Indicate what value AL contains after each of the following MOV instructions. (2 points each) MOV AL, DS:[BX] AL = MOV AL, BH AL = MOV AL, DS:[BX+5] AL = MOV AL, DS:[2003] AL = Address DS:2000 DS:2001 DS:2002 DS:2003 DS:2004 DS:2005 Value 23h 5Fh 10h ACh 5Bh BCh 10.) What physical address does the segment register pair 2400:1234 represent (values are in hex)? (4 points) 11.) Circle the best answer Machine code is: a) Synonymous with assembly language (i.e., another word for assembly language) b) Synonymous with high-level languages such as C++ or Visual Basic c) The words that you use to curse at your PC d) A language not available to the user that controls the inner workings of the Control Unit e) Binary values interpreted by the Instruction Decoder to determine what CPU will do next f) Unique commands used to control specific pieces of the computer's hardware. 12.) Name the two benefits of the segment/pointer addressing system of the 8088 and 8086. (4 points) 13.) Assume a processor takes 3 cycles to execute any instruction (fetch, decode, execute) a. How many cycles would a pipelined processor take to execute 10 instructions? b. How many cycles would a non-pipelined processor take to execute 10 instructions? 14.) On an 80x86 processor with 32 address lines, what is the maximum number of I/O ports?

Questions 15, 16, and 17 are based on the following RS232 signal sent with 8 data bits and parity. Logic 1 Logic 0 One bit time 15.) What is the binary value being transmitted in this signal? (4 points) 16.) Is the parity bit ODD or EVEN? 17.) If the BAUD rate of this signal was 9600 bits/second, what would the data bits per second be? (3 points) 18.) Classify each of the following characteristics as RS232 serial (R), USB (U), Firewire (F), GPIB (G), or SCSI (S). (2 points each) Developed by Apple for the transmission of video and audio Can only provide communications between two devices Primarily used for scientific instrumentation Has numerous different specifications for wiring and connectors It is the faster of the two methods that use four conductors (wires) in their cables Uses two possible data connection speeds on a single network Parallel data transfer up to 160 MByte/s 19.) What is the accuracy or resolution of a 10-bit analog to digital conversion system with a minimum value of 3 volts and a maximum of 12 volts? Just write the equation with the correct values. (3 points) 20.) If the voltage range of an 8-bit ADC is from 0 volts to 5 volts, what does a binary output from the ADC of 01100100b = 100 represent? Just write the equation with the correct values. (4 points) 21.) If an analog to digital conversion system is taking samples once every 1x10-6 seconds, what is the highest frequency that the sampled data will detect or capture? (3 points)