6+7+8 Flashcards

1
Q

How can we read and write to memory?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the main buses in a computer? What is a bus for?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does memory work?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the arithmetic logic unit do?

A

Performs arithmetic operations, performs logical operations. Has several subunits: Adder (and subtraction), logical tests, logical operations, shifting, comparison(via subtraction) and, multiplication and division.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the control unit do?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are registers?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are some special registers?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are instructions made up of?

A

Bit patterns, split into number of fields, one specifies operation, others specify address in memory of operands and where to place result.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is Von Neumann Architecture?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is machine code? Why don’t we typically use it?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is assembly language?

A

Give mnemonics to numbers, making it easier to remember and program. We can also give names to memory locations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does an assembler and disassembler do?

A

Assembler translates from assembly to machine code, disassembler translates from machine code to assembly language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an instruction set? What is the syntax?

A
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is memory space divided into? What is special about page 1?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the 6502 registers and flags?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do JSR and RTS do?

A

JSR <address> pushes the return address onto the stack and calls. Stores the value of Program counter + 2 at memory location S and S-1 subtracts 2 from S and loads PC with <address>.
RTS returns to caller. Loads PC with S+1 and S+2. Adds 2 o S and 1 to PC.</address></address>

17
Q

What are the functional groups of instructions?

A

Data transfer, data processing, test and branch, input/output, and control.

18
Q

What are the addressing modes of the 6502?

A

Inherent: Instruction doesn’t take operands
Immediate: Value to use specified as operand.
Absolute addressing: Value stored at memory location specified in operand.
Zero Page addressing: Use single byte address, only page zero is usable, this is faster than using other pages.
Relative addressing: Value is relative to here.
Indexed addressing: Value to use is stored at memory location that is sum of operands.
Indirect addressing: Value is stored at the memory location specified at the memory location in the operand.
Indexed indirect addressing:Value stored at memory location specified at the memory location in the operand.