You need to type in your solution except for diagrams.
Give the codes for each of the following signed decimal integer values, fill in values directly into the table below. Given each answer as a 2-digit hexadecimal value. It is not necessary to show your work (base conversion, twos complementing operations.
Decimal |
SM |
One’s complement |
Two’s complement |
-96 |
11100000 |
1100000 |
0010 0000 |
-85 |
11010101 |
1010101 |
00101011 |
-1 |
1000 0001 |
1111 |
0111 1111 |
3 |
0000 0011 |
0011 |
1111 1101 |
78 |
01001110 |
1001010 |
10110010 |
128 |
010000000 |
10000000 |
110000000 |
Given the 32-bit two’s complement internal representation for each of the following signed integers. Give each answer in hexadecimal (8 digits). Show your work
2 1234567090
2 617283545 -0
2 308641772 -1
2 154320886 -0
2 77160443 -0
2 38580221 -1
2 19290110 -1
2 9645055 -0
2 4822527 -1
2 2411263 -1
2 1205631 -1
2 602815 -1
2 301407 -1
2 150703 -1
2 75351 -1
2 37675 -1
2 18837 -1
2 9418 -1
2 4709 – 0
2 2354 -1
2 1177 -0
2 588 -1
2 294 -0
2 147 -0
2 73 -1
2 36 -1
2 18 -0
2 9 -0
2 4 -1
2 2 0
2 1 0
0100 1001 1001 0101 1111 1111 1011 0010
= (4995FFD2)16
2 2777 888099
2 1388944059 -1
2 694472024 -1
2 347236012 -0
2 173618006 -0
2 86809003 -0
2 43404501 – 1
2 21702250 -1
2 10851125 -0
2 5425562 -1
2 2712781 -0
2 1356390 -1
2 678195 -0
2 339097 -1
2 169548 -1
2 84774 -0
2 42387 -0
2 21193 -1
2 10596 -1
2 5298 -0
2 2649 -0
2 1324 -1
2 662 -0
2 331 -0
2 165 -1
2 82 -1
2 41 -0
2 20 -1
2 10 -0
2 5 -0
2 2 -1
= (1101 0010 1100 1001 1001 1010 1011 0001)16
= (D2C99AB1)16
(7E45E012)16 = (0111 1111 0100 0101 1110 0000 0001 0010)2
1*230 +1*229 +1*228 + 1*227 +1*226+1*225 +1*224 + 0*223 +1*222+0*221 +0*220
+ 0*219 +1*218+0*217 +1*216 + 1*215+1*214+1*213 +0*212 + 0*211 +0*210+0*29 +0*28
+ 0*27 +0*26+0*25 +1*24 + 0*23 +0*22+1*21 +0*20
= 2,135,285,778
= (1111 1010 0110 0110 0001 0001 0000 1011)2
The first letter has a negative (-ve)
1*230 +1*229 +1*228 + 1*227 +0*226+1*225 +0*224 + 0*223 +0*222+1*221 +0*220
+ 0*219 +1*218+1*217 +0*216 + 0*215+0*214+0*213 +1*212 + 0*211 +0*210+0*29 +1*28
+ 0*27 +0*26+0*25 +0*24 + 1*23 +0*22+1*21 +1*20
= -2,053,509,387
Solution
Immediate addressing mode involves data following instructions. As an illustration, the data that has to be used is already in the instruction itself. For instance, MOV A, #25H (This instruction moves data 25H to the accumulator. However, the # sign shows that the preceding term is data not address)
Direct addressing mode. Within this mode, the address of data to be read is directly given in the instruction. For instance, MOV A, 46H (This instruction will move the contents of memory location 46H to accumulator).
Instruction
Indirect addressing mode: The data is stored in registers or memory location indirectly. Conversely, the instruction set the memory location of the address of the data to be stored. E.g., MOV R2, 37H. The instruction moves the content of address present at 37H to register R2.
register addressing mode: The source of data or destination of the result is registered. However, the name of the register is given in the instruction where the data to be read or result to be stored (Patterson & Hennessy, 2013). For example Add, R3, R4. The instruction adds the contents of register R4 to R3 and then store it to R3.
Register indirect addressing mode: The data is read or stored in register indirectly. The register is provided in the instruction where the address of the other register is stored or which points to other registers where data is stored or to be stored (Patterson & Hennessy, 2013). For instance, MOV A, @R0. This instruction will move the data to accumulator from the register whose address is stored in register R0. This is similar to the index mode except that instead of an index register, a base register will be used. The base register contains a pointer to a memory location.
mode is also called PC-relative addressing. The implicitly referenced register is the program counter (PC). The next instruction is added to the address field to produce the EA. The address field is usually treated as a twos complement number for this operation. Therefore, the effective address is a displacement relative to the address of the instructions (Patterson & Hennessy, 2013). For instance, Move X (PC), R1. The contents at address X+PC are moved to R1.X contains a constant value.
A version of displacement addressing
R = program counter, pc
EA = A + (PC)
Base-register addressing mode: This mode is similar to index addressing mode, but instead of suing index register it utilizes the value of base register which is called offset. For instance, MOV R2, BR + offset. This moves the content of effective address by adding BR and Offset to the register R2
A holds displacement
R holds pointer to base address
R may be explicit or implicit
Index addressing is the address of the operand which is obtained by adding to the contents of the general register a constant value. However, the number of the index register along with the constant value is included in the instruction code.
A = base
R = displacement
EA = A + R
This is therefore good for accessing arrays
5 An instruction is stored at location 200 with its address field at location 201. The address field has the value 300. A processor register R1 contains the number 100. Evaluate the effective address if the addressing mode of the instruction is a) direct; b) immediate; c) relative; d) register indirect; e) index with R1 as the index register
The instruction is stored at location 200 with address field at 201. However, the address field has the value 300. The processor register R1 has the number 100.
(a). Direct.
To evaluate our addressing mode as direct, we pull the number from the value of the address field. In this case, the direct is 300.
(b). Immediate addressing mode
For the case of immediate addressing mode, we seek out the instruction stored location. In our case is 200 which is the answer.
(c) Relative
Concerning relative location, the formula for calculation is as follows:
Addressing Field Location + Processor Register = Relative Location
In this case, it is 201+ 100 = 301.
(d). Register indirect
The effective address for indirect register mode is 100.
(e). Index with R1 as the index register
The formula for getting this is;
Address Field Value + Processor Register = Indexed Location
300 + 100 = 400
Solution
The speedup ratio is defined as the speedup of a pipeline processing concerning the equivalent non-pipeline processing. The below is the formula for getting speed up ratio
S = ten/ (K+n-1) tp
The number of tasks n = 80
For nonpipeline:
Time is taken by pipeline to process a task in = 40 ns
Total time is taken by pipeline to process 80 task = ten
= 80*40
= 3200 ns
For pipeline:
Number of segment pipeline K = 6
Time period of 1 clock tp = 10 ns
Total time requires to complete n tasks in K segment pipeline with tp clock cycle time:
= (k+n-1) tp
= (6+ 80-1)10
= 850 ns
Speed up Ratio:
When the total time taken by the pipeline to process 80 is divided by the total time required to complete n tasks in K segment pipeline with tp clock cycle time then speed up ratio is obtained.
S = 3200/850
= 3.76
The speedup ratio of the pipeline for 80 tasks is therefore 3.76
Maximum speed up ration:
As the number of tasks increases, n becomes very small k+n-1 approaches to n, and hence the speed up ration becomes Smax = nTN/tp
Hence it is;
Smax = 40/10
= 4
In this case, the maximum speedup ratio that can be achieved is 4
References
Patterson, D. A., & Hennessy, J. L. (2013). Computer Organization and Design MIPS Edition: The Hardware/Software Interface. Newnes.
Organization/Textbooks/ComputerOrganizationAndDesign5thEdition2014.pdf.
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Contact Essay is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Essay Writing Service Works
First, you will need to complete an order form. It's not difficult but, in case there is anything you find not to be clear, you may always call us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download