6+7+8 Flashcards
How can we read and write to memory?
Memory is just a series of flip flops. To write we can use a demultiplexer to get the correct flip flops to remember the data, to read we can do the same, opening a tristate buffer to allow information to flow out of the correct flip flops.
What are the main buses in a computer? What is a bus for?
Data bus: For data input and output.
Address bus: tells us which memory cells to use.
Control bus: Output enable and write enable + other control information.
A bus is used to communicate between computer parts, only one device may transmit at a time and only the addressed device may respond.
How does memory work?
Flip flops grouped into bytes or lager, each of which has a unique address. To write we present address and data and tell the chip to write. To read we present address, tell chip to read and look at the data.
What does the arithmetic logic unit do?
Performs arithmetic operations, performs logical operations. Has several subunits: Adder (and subtraction), logical tests, logical operations, shifting, comparison(via subtraction) and, multiplication and division.
What does the control unit do?
Coordinates the operation of the computer, this is done by generating control signals which connect registers to bus, control ALU function and provide timing signals.
What are registers?
Memory cells with names, they hold data, instructions,etc. The program counter and memory address registers must be the same width as address bus. Registers which hold data must be same width as memory words.
What are some special registers?
Program counter, memory address register, accumulator(source of one operand and destination of result), and status flags(stores bits which hold information about results of operations).
What are instructions made up of?
Bit patterns, split into number of fields, one specifies operation, others specify address in memory of operands and where to place result.
What is Von Neumann Architecture?
Data and instructions stored in a single read-write memory. Memory is addressable by location, with no regard to what is stored there. Execution occurs in sequential fashion, unless explicitly altered.
What is machine code? Why don’t we typically use it?
Programming done by putting bit-patterns into the instruction.
It is difficult to program with, slow to enter, hard to read, and debugging is hard
What is assembly language?
Give mnemonics to numbers, making it easier to remember and program. We can also give names to memory locations.
What does an assembler and disassembler do?
Assembler translates from assembly to machine code, disassembler translates from machine code to assembly language.
What is an instruction set? What is the syntax?
The set of all instructions for a particular CPU, these consist of one or more fields: the opcode and optionally some operands. ; Parameters # immediate $ hex value % binary 0 octal () use the target as a pointer
What is memory space divided into? What is special about page 1?
Three chunks: ROM, RAM and Memory Mapped I/O. These are all made up of pages (in the 6502 these are 256 bytes each), the first of which is the zero page 00xx. The next page 1 01xx.
Page 1 is reserved for the stack, which grows downwards.
What are the 6502 registers and flags?
A(8 bit accumulator), x and y(8 bit index registers)
PC(program counter), S(stack pointer), P(processor flags)
P holds information on the result of the previous operations: C for carry, Z for zero, V for overflow, N for negative, among others.