Control System is to _____________, while Monitoring System is to ________________.
Actuator and Sensors
How does this code work?
MOV EAX, 4
MOV EBX, 1
MOV ECX, "9"
MOV EDX, 1
INT 0X80
A NASM code that prints the value 9
Which horror game features a character named Pyramid Head?
Silent Hill 2
Assume ACC value is: 01 0 1 0 0 1 1
What is the new ACC value when we perform:
OR #51
Assembler
Assume ACC value is: 01000110
What is the new ACC value when we perform:
LSR #3
00001000
What is the purpose of Control Unit
Direct the operation of the processor.
Manage and coordinate the operations of the CPU,
Act as the "brain" of the computer, directing and coordinating the operation of all other parts of the computer
Handle all processor control signals, fetching code for instructions and providing control and timing signals
What type of addressing mode is LDI?
Indirect Addressing Mode
What dog breed has a blue tongue?
Chow-chow / Shar Pei
Differentiate between Symbolic, Relative, and Absolute addressing
Symbolic doesn't use memory addresses
Relative uses a Base Register
Absolute uses the actual memory addresses
Now you know how LDD, LDI, LDM, LDX work, explain how CMP, CMI, work?
CMP is direct addressing. You compare the accumulator to its corresponding operand, which is an address.
CMI is indirect addressing. You compare the accumulator to its corresponding operand, which is an address of the address of that value.
Write the Fetch-decode-execute cycle using register translation notation.
MAR ← [PC]
PC ← [PC] + 1
MDR ← [[MAR]]
CIR ← [MDR]
How does this code work?
MOV EAX, 3
MOV EBX, 0
MOV ECX, char
MOV EDX, 255
INT 0X80
NASM code used to get user inputs
In ‘Monsters, Inc.’, what powers the city of Monstropolis?
Children's screams
Find the error and why.
A. LDD 1001
B. LDX 1002
C. LDM 1003
LDM 1003, because operand should not be an address but the actual value itself.
What is the value of the latest accumulator:
Address | 100 | 101 | 110 | 111
Data | 0 | 0 | 51 | 65
Index Register : 1
Instruction:
LDR #1 ; STO 101 ; LDX 110 ; CMP 100; JPE 21; LDM #16
16
Bonus: Why was there a gap of 16 years between a World Cup Tournament?
World War II
Describe the four types of addressing modes
Direct - direct addressing. Load contents of that address into the accumulator.
Index- Use the address based on the summed up address of the operand and the value in the index register
Immediate - load value immediately into the accumulator.
Indirect - indirect addressing. Load contents of a memory location whose address is stored in the operand.
What is the only number that is both the sum and product of three consecutive positive integers?
6
Assume ACC value is: 10110110
What is the new ACC value when we continuously perform these instructions:
LSL #2
OR #37
LSR #2
XOR #22
LSL #2 - 11011000
AND #37 - 11111101
LSR #2 - 00111111
XOR #22 - 00101001
Assume ACC value is: 0 0 1 1 0 1 1 0
What is the new ACC value when we continuously perform these instructions:
AND B01001100
LSL #1
XOR #103
LSR #2
AND B01001100 - 00000100
LSL #1 - 00001000
XOR #103 - 01101111
LSR #2 - 00011011
Ann has a farm and is using a robot to harvest her bell peppers. State one device that would be used for the monitoring system and control system and explain how they are applied.
Infrared Sensor
Motion Sensor
Actuators (Robotic Arm, Wheels)
Infrared sensor is used to identify the shape of the fruit if it is ready to harvest. Motion sensor is used to detect any movements upon pick-up. Actuators is used to collect the bell peppers.
Identify the operand of the following opcode:
LDD -
CMP -
LDX -
LDM/LDR -
INC -
LDD - address
CMP - denary number
LDX - address
LDM/LDR - denary number
INC - register
What is the largest desert in the world?
Antarctica / Antarctic Polar Desert
Arithmetic Group
Bitwise Group
Conditional Group
Shift Operations
What is the value of the latest accumulator:
Memory | 21 | 100 | 101 | 110 | 111
Address | end | 100 | 0 | 100 | 65
Index Register : 1
Instructions:
LDR #1 ; STO 101 ; LDX 110 ; CMP 100; JPE 21; LDM #5
1