01 introduction Flashcards
Parts of the Machine Cycle
Fetch, Decode, and Execute
Retrieve the instruction from the memory and increment the Program Counter
Fetch
Decode the bit pattern in the Instruction Register
Decode
Perform the instruction in the Instruction Register
Execute
Decodes the bits to determine what should happen
CPU
Is stored in memory as bunch of bits
Instruction
Sequence of simple instructions
Executable program
Where is the sequence stored?
Memory
True or False
The CPU processes the simple instructions sequentialy.
True
This is what the computer actually sees and deals with.
Machine Language
Every command the computer sees is given as ______ or ________
a number or sequence of numbers
The same as machine language, except the command numbers have been replaced by letter sequences which are easier to memorize
Assembly Language
Maps human-readable mnemonics to machine instructions
Allows machine-level programming without writing in machine language
Assembly Language
Makes programming easier
Allow you to describe the program in a more natural language
High-level Language
Low-level language which provides the basic instructional interface to the computer processor
Is as close to the processor as you can get as a programmer
Assembly Language
What are the direct controls that Assembly language gives
- setting processor registers
- accessing memory locations
- interfacing with other hardware elements
Reason NOT to use assembly
- Development time: it takes much longer to develop in assembly
- Maintainability: unstructured
- Portability: platform-dependent
Reasons to use assembly
- To understand how CPUs and compilers work
- Developing compilers, debuggers and other development tools
- Hardware drivers, system code and low-level tasks such as bootloaders
- embedded systems
- Reverse Engineering
- Address critical performance issues (Optimizing for speed or space)
- Creating/fighting malware
- writing low-level programs helps programmers improve algorithm development skills by practicing with a language that requires more thought and more attention to detail.
Devices connected to the bus
Input and Output (I/O devices)
A collection of the computer’s electrical lines where signals pass through
bus
The bus is typically designed to transfer fixed-sized chunks of bytes known as _____
words
The computer’s processor
Engine that interprets (or executes) instructions stored in main memory
Central Processing Unit (CPU)
Includes the Arithmetic and Logic Unit and CPU Registers
CPU chip
A logic circuit in the CPU that is responsible for performing mathematical and logical operations
Arithmetic and Logic Unit (ALU)