Question

In: Computer Science

1. If a processor addresses a maximum of (2 to the power of 20) bytes of...

1. If a processor addresses a maximum of (2 to the power of 20) bytes of memory, then, what is the maximum number of 16-bit words that can be stored in this memory?

2. Convert the following base 12 number "A1B" to decimal. Assume it is unsigned.

3. If a certain processor has a system frequency of 100 MHz, what is the clock period?

4. Write the code to implement the expression

A = (B + C) * (D + E)

On 3, 2, 1, and 0 address machines. In accordance with programming language practice, computing the expression should not change the value of its operands.

5. Compare the number of memory accesses for data needed to compute the expression by the four machines of question 3. A = (B + C) * (D + E)

6. What must an Instruction specify?

7. Instructions can be devided into 3 classes:

8. What is the meaning of the following RTN statement:

(OP:=12) R[ra] <-----R[rb]+R[rc]:

9. Describe the following RTN statements:

a. IR <31..0>

b. OP<4..>:=IR<31..27>

10. What decimal value does the binary word 1010 1111 0101 0100 have when it represents an:

a. Unsigned integer

b. 2's compliment

Solutions

Expert Solution

Ans-1)

1 byte = 8 bits = 23 bits

As a processor can address max = 220 bytes, so number of bits addressed by processor = 220 * 23 = 223 bits

Now, one word requires 16 bits = 24 bits.

Therefore,

Maximum number of 16 bits word that can be stored =

= = =

Ans-2)

To convert base-n number into decimal, one should follow following rule:

  1. Multiply each digit of given number with 12n, where n >=0. Here n stands for position of digit from right to left starting from 0. That means, rightmost digit position is 0, second rightmost is 1,and so on.
  2. Add all these multiplication obtained from previous step.
  3. Resultant sum is the answer in decimal.

In this example, given number is A1B

Note: For any number system greater than decimal (10), 9 is followed by A, B, C, D... representing 10,11,12,13,...in decimal number system.

Now in given example base is 12

Follow the steps to get answer:

(122 x 10) + (121 x 1) + (120 x 11) = 1440 + 13 + 11 = 1464

Thus 1464 is decimal equivalent of A1B base 12.

Ans-3)

Clock period = = = 10-8 seconds = 10 nanoseconds

Ans-4)

A=(B+C) * (D+E)

3-ADDRESS: In 3 address code, it has 3 addresses - 2 operands and 1 result.

ADD R1, B, C // Add B and C then stores at register R1 
ADD R2, D, E // Add D and E then stores at register R2
MUL A, R1, R2 // Multiply R1 and R2 then stores at A

2-ADDRESS: In 2 address code, it has 2 addresses - 1 source and 1 destination

MOV R1, B //Move B into register R1
ADD R1, C //Add C with R1. It means R1 = R1 + C
MOV R2, D //Move D into register R2
ADD R2, E //Add E with R2. It means R2 = R2 + E
MUL R1, R2 //Multiply R1 and R2. It means R1 = R1 * R2
MOV A, R1 //Store result R1 into A.

1-ADDRESS: In 1 address code, it can have only one operand(i.e. Accumulator (inbuilt register)).

LDA B // Load B into accumulator(inbuilt register) 
ADD C // Add C with Acc. It means Acc = Acc + C
STA T // Store Acc at memory location T.
LDA D // Load D into accumulator(inbuilt register) 
ADD E // Add E with Acc. It means Acc = Acc + E 
MUL T // Multiply data at T with Acc.
STA A // Store result Acc at A

0-ADDRESS: In 0 address code, no address are referenced. Inbuilt Stack operation( Push and Pop) are used.

PUSH B   //Top of Stack <- B
PUSH C   //Top of Stack <- C
ADD      //Pop C and B then add both operands and push them at Top of Stack<-(B+C)
PUSH D   //Top of Stack <- D
PUSH E   //Top of Stack <- E
ADD      //Pop E and D then add both operands and push them at Top of Stack<-(D+E)
MUL      //Multiply first two elements of stack and push them at 
           Top of Stack <- (B + C) * (D + E)
POP A    //Pop Top of Stack and store at A

Related Solutions

A block of addresses is granted to a small organization. one of the addresses is 172.10.0.84/20....
A block of addresses is granted to a small organization. one of the addresses is 172.10.0.84/20. a) What are the first and the last addresses of this block? b) Determine the number of addresses granted to this small organization. c) The network administrator of this small organization wants to create eight subnets. Determine i) the subnet mask, ii) the address of each subnet, iii) number of addresses in each subnet, vi) the range of IP addresses in each subnet, and...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes),...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes), and the disk block size is 2KB. The file control block (FCB) contains an index table of 512 bytes. Answer the following questions: (2) [4 MARKS] Suppose that the index table area adopts the following structure: the first 8 bytes (0 ~ 7 ) use <start block number, number of blocks> to represent the pre-allocated continuous storage space during file creation, in which the...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes),...
Assume that the maximum capacity of a file system space is 8TB (1TB = 240 bytes), and the disk block size is 2KB. The file control block (FCB) contains an index table of 512 bytes. Answer the following questions: (1) [4 MARKS] Suppose that the index table only adopts the direct index structure, and stores the disk block numbers occupied by the file. How many bytes are required for each index table entry to represent a disk block number? What...
2.  [17: 20, 10, 2, 1] Find the Banzhaf power distribution for this system. P1:                  P2:         
2.  [17: 20, 10, 2, 1] Find the Banzhaf power distribution for this system. P1:                  P2:                  P3:                  P4:
1) Windows Powershell: Maps IP addresses to MAC addresses. Maps IP addresses to MAC addresses. Run...
1) Windows Powershell: Maps IP addresses to MAC addresses. Maps IP addresses to MAC addresses. Run arp /? What does the command show? 2) Ping is used to test the ability of one network host to communicate with another. Run: ping cnn.com or ping yahoo.com or ping facebook.com write down the results
A steam power plant operates with a maximum pressure of 3500 psia and maximum temperature of...
A steam power plant operates with a maximum pressure of 3500 psia and maximum temperature of 1050 oF. Assume a simple Rankine cycle, condenser pressure is 10 psia, and turbomachinery is isentropic. Turbine work in Btu/lb Pump work in Btu/lb Heat addition in steam generator in Btu/lb Cycle thermal efficiency
Assume that 20 bytes of Packed BCD data is present in a data memory at location...
Assume that 20 bytes of Packed BCD data is present in a data memory at location 0x300 to 0x313. You have to write an assembly program that will display data on a two seven segment displays one connected to Port A and other connected to Port B using loops. You also have to analyze data if the data is equal to 0x22 then start storing data bytes at corresponding memory address 0x400 to 0x413 in reverse order i.e. if the...
A processor has a clock rate of 2.5 GHz. It’s dynamic power is 80 W and...
A processor has a clock rate of 2.5 GHz. It’s dynamic power is 80 W and static power is 20 watt. It executes a certain program in 25 seconds. a. What is the power consumption if clock frequency is slowed down by 30%? b. What will be the new execution time for the program which earlier took 25 seconds after slowing down the clock as in part a? c. What is the power consumption if voltage is decreased by 15%?
An AC power supply produces a maximum voltage ΔVmax = 88 V. This power supply is...
An AC power supply produces a maximum voltage ΔVmax = 88 V. This power supply is connected to a resistor R = 27.0 Ω, and the current and resistor voltage are measured with an ideal AC ammeter and voltmeter as shown in the figure below. An ideal ammeter has zero resistance, and an ideal voltmeter has infinite resistance. (a) What is the reading on the ammeter? A (b) What is the reading on the voltmeter? V
1. What is a difference between general purpose processor and single purpose processor? Also write the...
1. What is a difference between general purpose processor and single purpose processor? Also write the Advantages and disadvantages, and how they complement each other. 2. Give one ESD hypothetical application and discuss SOC system.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT