Reads the code character by character and removes redundant characters before labelling each operator with a token.
Syntactical Analysis
Determines logic of the code generated by the lexical analysis. Also involves an examination of whether the identified statements follow correct syntax.
Code Generation
Code generation is the process of automatically producing code based on some input, including high-level specifications, data models, or other types of descriptions.
Machine Code and Program Execution
Video leads to 404 not found page.
General Role of Computer Components
Program Counter
The Program Counter (PC) is a register that holds the memory address of the next instruction to be executed.
Memory Address Register
The Memory Address Register (MAR) contains the memory address of the data that needs to be accessed from the memory.
Memory Data Register
The Memory Data Register (MDR) holds the data that has been read from or will be written to memory.
Instruction Register
The Instruction Register (IR) holds the current instruction being executed.
Control Unit
The Control Unit (CU) is responsible for controlling the flow of data within the computer. It interprets instructions fetched from memory and generates the necessary signals to execute them.
ALU
The Arithmetic Logic Unit (ALU) performs arithmetic and logical operations on data.
Accumulator
The Accumulator (ACC) is a register that stores intermediate results during computations.
Buses
Buses are communication lines that allow data to be transferred between components within the computer. There are three types of buses: data bus, address bus, and control bus. The data bus carries data between the CPU and memory or input/output devices. The address bus carries memory addresses between the CPU and memory. The control bus carries control signals between components.
Assembly Code Exercise
there is no way i gotta write assembly in 2024 😭
LD#000
AD#001
STOX#010
A. Add the data in 000 and 001, and store it to 010
Load 000 into data register
Add 001 and data register
Store into 010
B. Swap the data in 000 and 001
Load 000 into register
Unsure, will clarify next lesson.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (