Gimmenotes



2017-10 UNOFFICIAL MEMOQuestion 1: General Knowledge [30]A ____ contains electronics for exchanging data, control, and status signals with an I/O module plus the electronics for controlling the disk read/write mechanism.C driveCommand driveDisk driveProcessorCacheTwo addresses are dedicated to keyboard input from a particular terminal. Address 516 refers to the data register and address 517 refers to the ____.memorystatus registerisolated I/Oinput registeroutput registerWhich one of the following instruction would you use if you want to branch to the label TEST if the sign flag is set?JN TESTJZ TESTJS TESTJNS TESTJNP TESTThe ____ provides signals that control the operation of the Arithmetic and Logic Unit (ALU) and the movement of the data into and out of the ALU.Data busAntennaeMagnetic driveTemporary memoryProcessorThe major functions or requirements for an I/O module fall into the following categories except ____.error detectionprocessor communicationdevice communicationerror controldata bufferingGiven A and B as input and F as out function, the algebraic expression XOR is____.F = A ⊕ BF = A – BF = A + BF = A * BF = (A / B)Which of the following are characteristics of Blu-ray DVDs?It can store more than 20 GB per sideIt has slightly more storage density as normal DVDsIt uses a short wave-length 405 nm laserIt uses a red-blue laserThere are two version available: read-only (BD-ROM) and recordable many (BD-M)only a, b and donly a and conly a and ea, b, c and donly b and dSuppose a machine has seven (7) general-purpose 32-bit registers. How many bits must be reserved to the machine code instruction in order to address any of these seven registers?12345As one goes down the memory hierarchy, the following occur except ____.Decreasing frequency of access of the memory by the processorIncreasing capacityDecreasing access timeDecreasing costNone of the answers given above is correctWhich one of the following binary codes have even parity (assume that the left-most bit is the parity bit)?1010111010101010101001111111000100000001Suppose AL contains the value 8Ah. What will be the result of the following instruction?sar al, 311hE2h50hF1hNone of the above____ flushes the internal cache memory after writing dirty lines to memory.INVDWBINVDINVLPGLDSSGDTThe ____ module transfers the entire block of data, one word at a time, directly to or from memory.Data cacheDMAROMEPROMAddress registerWhich of the following is NOT a reason for writing programs in assembly language rather than using a high-level programming language?Code is often much fasterInsight into the problem often allows real improvement in performanceThe program logic is easy to followIt allows complete access to hardwareIt can be used to write function libraries that are compatible with multiple operating systemsThe result of the following hexadecimal addition is ____.ECh + 98h184h24Ah182h1A4hNone of the aboveQuestion 2 [16]Explain four reasons why peripheral devices are not directly connected to the system bus [6]There are a wide variety of peripherals with various methods of operation. It would be impractical to incorporate the necessary logic within the processor to control a range of devices.The data transfer rate of peripherals is often much slower than that of the memory or processor. Thus, it is impractical to use the high-speed system bus to communicate directly with a peripheral.On the other hand, the data transfer rate of some peripherals is faster than that of the memory or processors. Again, the mismatch would lead to inefficiencies if not managed properly.Peripherals often use different data formats and word lengths than the computer to which they are attached.Discuss five sequences of hardware events that occur when an Input/output (I/O) devices completes an I/O operation [10]The device issues an interrupt signal to the processor.The processor finishes execution of the current instruction before responding to the interrupt.The processor tests for an interrupt, determines that there is one, and sends an acknowledgment signal to the device that issued the interrupt. The acknowledgment allows the device to remove its interrupt signal.The processor now needs to prepare to transfer control to the interrupt routine. To begin, it needs to save information needed to resume the current program at the point of interrupt. The minimum information required is (a) the status of the processor, which is contained in a register called the program status word (PSW), and (b) the location of the next instruction to be executed, which is contained in the program counter. These can be pushed onto the system control stack.The processor now loads the program counter with the entry location of the interrupt-handling program that will respond to this interrupt. Depending on the computer architecture and operating system design, there may be a single program; one program for each type of interrupt; or one program for each device and each type of interrupt.See page 233 for a summary diagram:Hardware:Device controller or other system hardware issues an interruptProcessor finishes execution of current instructionProcessor signals acknowledgment of interruptProcessor pushes PSW and PC onto control stackProcessor loads new PC value based on interruptQuestion 3 [10]Convert 1110 and 1310 to binary numbers [4]1*1 + 1*2 + 0*4 + 1*8 = 11 = 101121*1 + 0*2 + 1*4 + 1*8 = 13 = 11012Determine the product of the binary numbers you obtained in (a) [2] 1011* 1101 1011+ 0000+ 1011+ 1011 ? 10001111 = 14310Compared with the pencil-and-paper approach, explain two ways to make computerised multiplication more efficient [4]First, we can perform a running addition on the partial products rather than waiting until the end. This eliminates the need for storage of all the partial products; fewer registers are needed. Second, we can save some time on the generation of partial products. For each 1 on the multiplier, an add and a shift operation are required; but for each 0, only a shift is required.Question 4 [14]Explain the term ‘gate’ in a digital logic circuit [2]A gate is an electronic circuit that produces an output signal that is a simple Boolean operation on its input signals.Given the following four gates, AND, OR, NOT and NAND, draw the graphical symbol, express the algebraic function and compute the Truth Table for each gate in the table below [12]NameGraphical SymbolAlgebraic FunctionTruth TableANDF = A ? BorF = ABABF000010100111ORF = A + BABF000011101111NOTF = EQ \x \to(A) orF = A’AF0110NANDF = EQ \x \to(AB) ABF001011101110Question 5 [15]Write a program using two-address machine instructions to execute: [5]Y=A-BC+(D*F)MOVE Y, A Y ← ASUB Y, B Y ← Y-BMOVE T, D T ← DMPY T, F T ← T*FADD T, C T ← T+CDIV Y, T Y ← Y/TSee page 410Explain the following stack addressing terms.Stack Pointer (SP) [2]A stack pointer is associated with a stack, which is a reserved block of locations. Its value is the address of the top of the stack.PUSH [2]Data transfer operation to transfer from source location to the top of the stack.POP [2]Data transfer operation to transfer from the top of the stack to the destination location.Write short notes on memory management [4]In a uni-programming system, main memory is divided into two parts: one part for the OS and one part for the program currently being executed.In a multi-programming system, the “user” part of memory is subdivided to accommodate multiple processes. The task of subdivision is carried out dynamically by the OS and is known as memory management. Effective memory management is vital in a multiprogramming system.If only a few processes are in memory, then for much of the time all of the processes will be waiting for I/O and the processor will be idle. Thus, memory needs to be allocated efficiently to pack as many processes into memory as possible.Question 6 [15]List and explain two (2) characteristics of Reduced Instruction Set Architectures (RISC) [6]One machine instruction per cycleA machine cycle is defined to be the time it takes to fetch two operands from registers, perform an ALU operation, and store the result in a register. Machine instructions can be hardwired, and should execute faster than comparable machine instructions on other machines.Register-to-register operationsMost operations should be register-to-register, with only simple LOAD and STORE operations accessing memory, thus simplifying the instruction set and the control unit. Such an architecture encourages the optimisation of register use, so that frequently accessed operands remain in high-speed storage.Simple addressing modesSimple instruction formatsSee page 547Write an assembly language program to execute the following: [9]Display a user prompt to key in a number < 10.Read a number (<10) from the keyboard.Convert from ASCII to numeric.Display an error message if the number is out of range.Test whether the number is even or odd. If the number is even, display the message ‘Number is even’, otherwise display the message ‘Number is odd’.NB Do not use division by 2.(Hint If the right-most bit of the number is equal to 1, the number is odd.)bits 16org 100hjmp mainmsg_prpt: db 'Enter a number (1-9): $'msg_err: db 0dh, 0ah, 'Number out of range. $'msg_odd: db 0dh, 0ah, 'Number is odd. $'msg_even: db 0dh, 0ah, 'Number is even. $'num: db 1display: mov ah, 9h ; "display string" function for int 21h int 21h retdsp_prpt: mov dx, msg_prpt ; copy contents of msg_prompt to dx call display retdsp_err: mov dx, msg_err ; copy contents of msg_err to dx call display retget_num: mov ah, 1h ; "character input" function for int 21h (stored in al) int 21h mov [num], al ; copy contents of al to space at address [num] retvalidate: mov dl, '0' ; copy character to dl for comparison cmp [num], dl ; compare to input character jb dsp_err ; display error if < 0 mov dl, '9' cmp [num], dl ja dsp_err ; display error if > 9 retconvert: sub al, 30h ; subtract 30h from input to get numeric from ascii retodd_even: shr al, 1 ; shifts all bits right 1, lowest bit to carry flag jc dsp_odd ; jump if carry is set (there was a bit in lowest position) mov dx, msg_even call display ret dsp_odd: mov dx, msg_odd call display retmain: call dsp_prpt call get_num call validate call convert call odd_even int 20h ; Terminate program ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches