Show how the value ascii miriam is stored in memory

Assignment Help Basic Computer Science
Reference no: EM13333107

1. Show how the value ASCII "MIRIAM" is stored in memory in Big Endian format starting at location 100 hexadecimal. Assume that each memory location stored two ASCII characters.

 

Memory Location

Value Stored

100

 

101

 

102

 

 

2. A given microprocessor has words of 1 byte.  What is the smallest and largest integer that can be represented in the following representations?

            a) unsigned

 

            b) sign- magnitude

 

            c) ones complement

 

            d) twos complement

 

            e) unsigned packed decimal

 

            f) signed packet decimal

 

3. Compare zero-, one, two-, and three- address machines by writing programs to compute

                        X = (A + B x C)/(D - E x F)

for each of the four machines.  Do not modify the values of A, B, C, D, E, or F.  If necessary, use a temporary location T to store the intermediate results.

The instructions available for use are as follows:

 

0 Address

1 Address

2 Address

3 Address

PUSH M

LOAD M

MOVE (XßY)

MOVE (XßY)

POP M

STORE M

ADD (XßX + Y)

ADD (XßY + Z)

ADD

ADD M

SUB (XßX - Y)

SUB (XßY - Z)

SUB

SUB M

MUL (XßX x Y)

MUL (XßY x Z)

MUL

MUL M

DIV (XßX / Y)

DIV (XßY / Z)

DIV

DIV M

 

 

 

4. Convert the following formulas from reverse Polish to infix:

            a) AB +C + D x

            b) ABCDE + x x /

5. Convert the following formulas from infix to reverse Polish:

a) A + B + C + D + F

b) (A x B) + (C x D) + E

6. Assume a stack-oriented processor that includes the stack operations PUSH and POP.  Arithmetic operations automatically involve the top one or two stack elements.

Beginning with an empty stack, what stack elements remain after the following instructions are executed?

 

Instruction

Stack (top number on left of stack)

PUSH 4

 

PUSH 7

 

PUSH 8

 

ADD

 

PUSH 10

 

SUB

 

MUL

 

 

 

7.  Consider a processor in which a two-word instruction is stored at location 100 with its address field at location 101 as shown below.

Memory

        Registers                             Address           Content

PC =100

 

100

Load to AC;  Mode

 

 

101

Address = 600

 

R1 = 300

 

102

Next instruction

 

 

:

:

 

XR = 200

 

200

300

 

 

:

:

 

BR = 300

 

300

700

 

:

:

AC = ?

 

400

200

 

:

:

 

 

500

100

 

 

:

:

 

 

600

400

 

 

:

:

 

 

702

500

 

 

:

 

 

 

800

900

 

 

:

:

 

 

900

800

 









 

The first word of the instruction specifies the operation code and mode; the second word specifies the address part.

The values of the program counter (PC register), a general register (R1), the index register (XR), the base register (BR), and certain addresses in memory are as shown below.

 

Evaluate the effective address and the value that is loaded into the AC for the following addressing modes:

 

 

Addressing Mode

Effective address

Value of the operand loaded into the AC

a)

Immediate

 

 

b)

Direct addressing

 

 

c)

Indirect addressing

 

 

d)

Register

 

 

e)

Register indirect

 

 

f)

Relative address

 

 

g)

Base register addressing

 

 

h)

Indexed addressing

 

 

 

 

Reference no: EM13333107

Questions Cloud

Explain what is the ph of a solution that is in nh4cl : NH3 is a weak base (Kb = 1.8 x 10^-5) and so the salt NH4Cl acts as a weak acid. What is the pH of a solution that is 0.044 M in NH4CL
What is the internal resistance of the solar cell : A solar cell generates a potential difference of 0.0984 V when a 500 ? resistor is connected across it, What is the internal resistance of the solar cell
What force acts on it at this position : a particle of mass 2kg moves along axis x through the region in which its potential energy u(x) varies, what force acts on it at this position
What will clubs stock price be at the end of the first year : Genuine Producs Inc. requires a new machine. Two companies have submitted bids, and you have been assigned the task of choosing one machine.
Show how the value ascii miriam is stored in memory : Show how the value ASCII "MIRIAM" is stored in memory in Big Endian format starting at location 100 hexadecimal. Assume that each memory location stored two ASCII characters.
Operates a commercial dive boat in a state : Operates a commercial dive boat in a state
Define how many grams of hcl are in a quart of muriatic acid : How many grams of HCl are in a quart of muriatic acid? The muriatic acid density is 1.18 g/mL and is typically 36.5% HCl by mass.
What is the speed of the ball as it strikes the ground : A 0.17 kg baseball is launched from the roof of a building 12m above the ground. What is the speed of the ball as it strikes the ground
What are the monthly payments : What will Levi's salary be in five years if he gets a 5 percent raise each year and what would his salary be in five years if the annual raise is 9 percent?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Create a program to calculate the average of the class

Define a function "double average(int, int)" to calculate the class average In main function call average function and display the average of the class

  Compare with that of a general pda

c) Could the Mark 100 or Mark 200X process this string: 0n1n? How about 1n0m1m0n? Succinctly justify you answer. d) How does the power of the Mark 100 and Mark 200X compare with that of a general PDA? Succinctly justify your answer.

  Designing a game system

Suppose that you are designing a game system that responds to players' pressing buttons and toggling joysticks. The prototype system is failing to react in time to these input events.

  What is x after the following if-else statement is executed

What is x after the following if-else statement is executed? Use a switch statement to rewrite it and draw the flowchart for the new switch statement.

  Explaining sites appropriate for mobile devices

What do you think are some of the types of sites that would be appropriate for mobile devices? What types of sites do you think are inappropriate?

  What change management initiatives should km group have

What change management initiatives should the KM group have initiated at Infosys before attempting to develop and implement knowledge management at the company?

  How value parameters useful in processing data in a program

Discuss some useful applications for n-dimensional arrays, such as graphical 3-D or biotechnology applications.

  Explaining security risks for computing infrastructure

In your new position at XYZ Corporation, you have been asked to lead risk assessment team. As part of project to assess security risks for computing infrastructure.

  What is the geometric center frequency

A band-pass filter has a lower cutoff frequency of 100 Hz and an upper cut-off frequency of 144 Hz. What is the geometric center frequency? (Points : 3) 120 Hz 130 Hz 134.5 Hz 140 Hz

  Write a method to set and retrieve an instructors department

write a method to set and retrieve an instructor's department

  How you identify a protected item in a uml diagram of c

How would you identify a protected item in a UML diagram of C++

  Compute millions of instructions per second of program

Compute the MIPS (Millions of Instructions Per Second) rating for each processor during execution of this particular program

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd