Dr. Hepsiba, we do not care

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Zero-address instruction method the operands are stored in

push-down stack

The call instruction...

pushes the contents of the PC onto the processor stack and loads the subroutine address into the PC

The assembler directive EQU, like SUM EQU 200, does what

replaces every occurrence of SUM with 200

In a system, 32 registers is how many bits long for the register ID? (think 2^n)

5 bits

Subtraction in computers is carried out by

2's complement

MUL 5(R1,R2)'s effective address is

5 + [R1] + [R2]

What do processors of all computers must have?

ALU is for operation, Control Unit is for coordination and primary storage is for registers etc..

Which of the following computer register collects the result of computation?

Accumulator

What is an operating system?

An Operating System acts as an intermediary between user/user applications/application programs and hardware. It is a program that manages hardware resources. It provides services to application programs.

During the execution of the instructions, a copy of the instructions is placed in the

Cache

The addressing mode where you directly specify the operand value is

Immediate

Who developed the basic architecture of the computer?

John Vonn Neumann

Which of the following is equal to 4 bits?

Nibble

instructions like MOV or ADD are called

OP-Code

Which of the following register keeps track of the instructions stored in the program stored in memory?

Program Counter

The addressing mode which uses the PC instead of a general purpose register is

Relative mode the contents of the PC are directly incremented

____ converts the programs written assembly language into machine instructions

Assembler

The main virtue for using single Bus structure is

Cost effective connectivity and ease of attaching peripheral devices

ADD LOC,R1 in RTN is

R1 <- [LOC] + [R1]

Computer address bus is (what-directional)

Unidirectional

Auto decrement

decrement is done before execution and is decremented automatically by 4

What is a subroutine?

A named block of code which performs a specific task within a program When branching to a subroutine, it is CALLING a subroutine, which is a Call instruction

Indirect mode example:

ADD (R1), R2 Adds the address of R1 to R2, and stores it in R2

3-address instruction of X = (A+B)/(C+D)

ADD A,B,R1 ADD C,D,R2 DIV R1,R2,X

Register Mode example:

ADD Ri, Rj - adds the contents of Ri and Rj and stores in Rj

The alternate way of writing the instruction ADD #5, R1 is

ADDI 5,R1;

Index mode example:

Add 20(R1), R2 If the address of R1 is 1000, it will increment R1 4 times, making R1 1020 and storing it in R2

List the steps needed to execute the machine instructions: Add LOCA, R0 Add R1,R2,R3

Add LOCA, R0 PC→MAR Issue RD Transfer MDR MDR→IR and decode it Transfer of LOCA from IR to MAR Issue a RD Load MDR MDR → ALU R0→ALU Perform addition Transfer result to R0 Transfer the content of PC to ALU Add 1 to operand in ALU and transfer the incremented address to PC. Add R1,R2,R3: PC→MAR Issue RD Transfer MDR MDR→ IR and decode it R1, R2 → ALU Perform addition Transfer result to R3 Transfer the content of PC to ALU Add 1 to operand in ALU and transfer the incremented address to PC.

The instruction ADD #45, R1 does what

Adds 45 to the value of R1 and stores it in R1 Ex. if R1's value is 10, it will make it 55. Not changing the address, but the value within that.

Instructions which won't appear in the object program are called as

Assembler directives

Which of the following format is used to store data?

BCD

Big Endian vs Little Endian

Big Endian Machine that stores the MSB Left to right Little Endian machine stores LSB right to left.

In which of the following form the computer stores its data in memory?

Binary form

While using the iterative construct (branching) in execution, _______ instruction is used to check the condition

Branch

When using branching, the usual sequencing of the PC is altered. A new instruction is loaded which is called as

Branch target

Which of the following memory of the computer is used to speed up the computer processing?

Cache Memory

Linkage Method

Call and Return Subroutines

The instruction fetch phase ends with

Decoding the data in MDR and placing it in IR

The effective address of MOV 5(R1),LOC is...

EA = 5+[R1]

The final statement of the source program should be

End

Explain the queue structure

FIFO Two pointers (front and rear) are needed to keep track of the two ends of the queue Front: deletion Rear: add

When dealing with the branching code the assembler

Finds the branch offset and replaces the branch target with it

When using auto increment or auto decrements, what is true?

In auto increment, the operand is retrieved first and then the address altered and Both of them can be used on general purpose registers as well as memory locations

The addressing mode which makes use of in-direction pointers is

Indirect addressing mode

The two phases of executing an instruction are

Instruction fetch and instruction execution

Explain the stack structure

LIFO A stack has two basic operations: push and pop Push: put a new item on top of the stack Pop: remove the item at the top of the stack

1-address instruction of X = (A+B)/(C+D)

LOAD B ADD A STORE R1 LOAD D ADD C STORE R2 LOAD R1 DIV R2 STORE X

The utility program used to bring the object code into memory for execution is

Loader

2-address instruction of X = (A+B)/(C+D)

MOV B,R1 ADD A,R1 MOV D,R2 ADD C,R2 DIV R1,R2 MOV R2,X

Which of the following memory unit communicates directly with the CPU?

Main Memory

Immediate mode example:

Move #200, R0 - places the value 200 in register R0

Absolute mode example:

Move LOC, R2 - moves content of the memory within LOC to the register R2

Pop operation in a stack

Move(SP), Item ADD #4, SP if processor has auto increment mode, then Move (SP)+, ITEM

Commonly used flags

N (negative) - sets to 1 if result is negative; otherwise 0 Z (zero) - sets to 1 if result is 0; otherwise 0 V (overflow) - sets to 1 if arithmetic overflow occurs; otherwise 0 C (carry) - sets to 1 if carry-out results from operation; otherwise 0

Can you perform an addition on 3 operands simultaneously in ALN using add instruction?

Not permitted You cannot perform an addition on three operands simultaneously because the third operand is where the result is stored.

What is the solution for synchronizing data transfer between a slow and fast machine?

On output, the processor sends the first character, waits for the signal from the device, then pushes another character On input, the processor waits for a signal indicating that a character has been struck, then the code for that character is available in a buffer associated with the input device (keyboard) The buffer is required to prevent overloading the CPU

0-address instruction of X = (A+B)/(C+D) (think of a stack)

PUSH A PUSH B ADD PUSH C PUSH D ADD DIV POP X

Stack Pointer (SP)

Points to a stack holding return addresses, procedure or function parameters, and local variables; it is accessed when a procedure or function is called or an interrupt is serviced.

ADD R1,R2,R3 in RTN is

R3 <- [R1] + [R2]

Which of the following computer memory is fastest?

Register

RTN stands for

Register Transfer Notation

what directive specifies the end of execution of a program

Return

What does a computer bus line consist of?

Set of parallel lines

Push operation in a stack

Subtract #4, SP Move NEWITEM, (SP) if processor has auto increment mode, then Move NEWITEM, -(SP)

The assembler stores all the names and their corresponding values in

Symbol table

Which of the following computer bus connects the CPU to a memory on the system board?

System bus

When ADD #45 is executed, what happens?

The first value is retrieved and one more operand is requested. in other words can't do nuthn

The condition flag Z is set to 1 to indicate

The result is 0

The purpose of ORIGIN directive is

To indicate the starting positive in memory where the program block is to be stored

To overcome the problems of the assembler in dealing with branching code we use

Two-pass assembler This creates entries into the symbol table first then creates the object code

READIN

branch to READWAIT if SIN=0 Input from DATAIN to R1 branch to WRITEWAIT if SOUT=0 Output from R1 to DATAOUT READWAIT is a loop for entering characters tbh we don't really know so good luck

Auto increment

increment is done after execution and is incremented automatically by 4

Which of the following is the function of the control unit in the CPU?

it decodes program instruction

What does one thousand bytes represent?

kilobyte

The assembler stores the object code in

magnetic disk

parameter passing

parameters may be placed in registers or memory locations, where it can be accessed by the subroutine or The parameters may be placed on the processor stack used for saving the return address stack can handle large number of parameters

The address in the main memory is known as

physical address

The return instruction...

pops the return address from the processor stack into the PC

Link Register

register used to hop from one place to another (sort of) remember the stack example she gave when writing higher level code push the address of int main() to stack (address 1004), move PC to function that it is running and push that address to stack (3004), after PC reaches "return", pop 3004 address in stack, PC moves back to 1004, pop that from stack and PC keeps going in int main()

Know how to add and subtract signed numbers (2's complement)

to convert a positive number to a negative, in this case 3 to -3, do dis 3 = 0011 3' = 1100 add 0001 -3 = 1101 tada

DATAWORD does what

used to perform initialization before the execution of the code

RESERVE does what

used to specify and assign the memory required for the block of code


संबंधित स्टडी सेट्स

Chapter 7 - Principles of Pharmacology

View Set

psy472 exam 1, PSY472 exam 2, psy472 unit 3

View Set

GOVT 2305: UNIT 1 Smartbook CH 4

View Set

Chapter 5 - Ecosystems and Living Organisms

View Set

Pathology 42% Scrotum, Thyroid, Vasc.

View Set