Memory Locations, Address, Instructions and Instruction ...
Memory Locations, Address, Instructions and Instruction Sequencing
Read pages 28-40
Memory locations and addresses
? The simple computer is a good start to understand computer organizations
? We need to study
? how data/instructions are organized in the main memory?
? how is memory addressed? ? addressing mode
Memory
? Holds both instructions and data ? With k address bits and n bits per location
k
Number of locations
10
210 = 1024 = 1K
16
216 = 65,536 = 64K
20
220 = 1,048,576 = 1M
24
224 = 16,777,216 = 16M
Address
0 n-1 . . . 1 0
1
2 . . .
2 k-1
? n is typically 8 (byte), 16 (word), 32 (long word), ....
Memory stores both data and instructions
? Consider 32-bit long word in each location which can store
? 32-bit 2's complement number (integer):
(-2n-1) ? (2 n-1? 1)
? If n = 32: - 2G ? 2G-1 (recall that G = 230 )
? 4 ASCII characters
byte byte byte byte
? A machine instruction
- It is often
convenient to address operands which are as short as 1 byte
byte
3 bytes
Op Code Address information
Dealing with strings of characters
? Byte addressable machine is almost universal
- Successive addresses refer to successive byte locations
- There are two different schemes for addressing byte:
big-endian
Address
0 012 3 4 456 7
8 . . .
little ? endian
Address
0 321 0 4 765 4
8 . . .
- Also bit can be numbered the other way around: bit 0 is the MSB
Memory addressing Example ? for a Computer
- Word = 16 bits
- Byte addressable ? uses big-endian
- Long word = 4 bytes
- 24 bits used for address words
16 M bytes or 8 M
Instructions and instruction sequencing
? Example computer instruction format:
- Uses multiple words of 16 bits
Op Code
4 bits
Address Inf.
12 bits
Opcode word (plus some addressing inf.)
Second word
Third word
- Typical instruction is Add: C = A+B
- Most general instruction is to add 2 numbers in memory and store in a 3rd location
Add A, B, C
[A]+[B] C
Problems for instructions with multiple memory locations
1. Long instructions
- Address of an operand = 24 bits
- Instruction length = 3 x 24 bits + opcode (4 bits) = 76 bits ? too much memory space
- Solutions: a) Use one- or two-address instruction:
Add A, B: [A]+[B] B
Add A:
[A]+[AC] AC
b) Use general-purpose CPU register
Often 8-64 bits of them - 8 registers use only 3 bits to select a CPU reg.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- overview lenovo
- performance lenovo
- dell optiplex 790 technical guidebook v 2 1
- xps 17 9700 setup and specifications dell
- precision 5560 technical guidebook
- quick start
- inspiron 3891 setup and specifications
- 2711p in004j en p logic module internal compactflash
- 7 1 chapter 7 memory system design chapter 7 memory
- ibuypower troubleshooting guide
Related searches
- linking curriculum instruction and assessment
- navy instructions and regulations
- navsup instructions and regulations
- opnav instructions and directives
- secnav instructions and directives
- opnav instructions and notices
- literacy research and instruction journal
- dod instructions and directives
- 2020 form 1040 instructions and tax tables
- memory and thought memory and imagination
- curriculum and instruction in education
- curriculum and instruction pdf