Back to marketplace

1.1.1 structure and function of processor

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Why was assembly language developed/ why write in assembly language?

Back (Answer)

• allow humans to input instructions easily without having to remember long strings of binary (1’s and 0’s). • allows programmer to write machine code (MC) using set of mnemonics that represent binary equivalent in MC • quicker/more efficent to translate to MC • makes more efficent use of CPU / system resources • programmer may want direct control over hardware/memory to access machine specific functionality • code written specifically for architecture • complier/interpreter may not be available

#2
Front (Question)

What are Mnemonics?

Back (Answer)

• Simplified instructions, used in assembly language, to easily write instructions.

#3
Front (Question)

Give examples of some mnemonics

Back (Answer)

• ADD, SUB, STA (store), LDA(load), BRA (branch always), BRZ(branch if zero), BRP(branch if positive), INP, OUT, HLT (end), DAT(data location), AVG.

#4
Front (Question)

what does HLT do?

Back (Answer)

• Ends the program

#5
Front (Question)

what does ADD do?

Back (Answer)

• Adds contents stored in specified memory location (uses operand) to value held in accumulator

#6
Front (Question)

what does SUB do?

Back (Answer)

• Subtracts contents stored in specified memory location using operand from value held in accumulator

#7
Front (Question)

what does BRA do?

Back (Answer)

• Always branches to address specified by operand. Unconditional branch

#8
Front (Question)

what does BRZ do?

Back (Answer)

Branches to address specified by operand if value in accumulator = zero. Conditional branch

#9
Front (Question)

what does BRP do?

Back (Answer)

• branches to address specified by operand if value in accumulator is 0 or positive. A conditional branch

#10
Front (Question)

what does STA do?

Back (Answer)

• Copies value held in accumulator to be stored in memory location specified by operand

#11
Front (Question)

what does LDA do?

Back (Answer)

Loads/copies value from specified memory location given by operand into accumulator

#12
Front (Question)

what does INP do?

Back (Answer)

Takes an input value from input area and stores into accumulator (opcode is 9 and operand is 01)

#13
Front (Question)

what does OUT do?

Back (Answer)

• Displays value held in accumulator in output area (opcode is 9 and operand is 02)

#14
Front (Question)

what does DAT do?

Back (Answer)

• indicate a location that contains data and an optional value for instruction (initialisation: it creates a variable identifier that can be used instead of an address in instructions).

#15
Front (Question)

where do you put data definitions for LMC

Back (Answer)

• Data definitions go at bottom of program

#16
Front (Question)

What will this do? num1 DAT 100

Back (Answer)

• it will map a memory location to identifier num1 and set its initial value as 100.

#17
Front (Question)

in machine code, there are different types of addressing modes specified by what?

Back (Answer)

• opcode

#18
Front (Question)

the addressing mode specifies the way in which _________ will be interpreted.

Back (Answer)

• operand

#19
Front (Question)

what does direct addressing mode do

Back (Answer)

• value in operand is referencing address in memory where the required value is located

#20
Front (Question)

what does immediate addressing mode do

Back (Answer)

• data to be used is the actual value of the operand. • often denoted with # in assembly language.

#21
Front (Question)

what does indirect addressing mode do

Back (Answer)

• value in operand is a reference to memory location that contains address in memory where required value is located

#22
Front (Question)

why is indirect addressing so useful

Back (Answer)

• large address ranges can be used to reference data and instructions

#23
Front (Question)

what does indexed addressing mode do

Back (Answer)

• index register = dedicated registers in the CPU. • Indexed referencing makes use of this register to access array with data in contiguous memory locations.

#24
Front (Question)

if operand is 1010 and index register stored value 0011, what would happen using indexed addressing if instruction is ADD 10

Back (Answer)

• operand specifies that memory location to be used is 10. it finds value in location and adds value in index register to that value (10+3=13) • therefore go to memory address 13 to access data to add.