Question

In: Computer Science

Problem A. A part of the code has been given below: ldd         $4000 ldx         $4002               &nb

Problem A.

A part of the code has been given below:

ldd         $4000
ldx         $4002
                                                                   idivs
                                                                   stx         $4005
                                                                   std         $4008

What does this code do? Include specific comments on each line of the code.
State the addressing mode of each instruction above.

Problem 2.

What does the following program doing. Rewrite the code and insert the comment field

org         $2000
ldaa       $1500
                                                                   adda
                                                                   stx         $4005
                                                                   std         $4008

Problem 3.
Convert the following numbers to decimal:

(a) 1001002   =
                     (b) 2 B91 =

Problem 4.
Convert the following numbers to Hexadecimal:
  
a.       1   2310 =
b.   10000012
Problem 6.
Write a procedure, assembly code, that clears the memory locations of $1000, $1001 and $1002 and transfer the values of memory location $1008, $1009, and $1010 onto them in respective order.
Problem 7.
   •   How many address lines are needed to address each memory location in a 2048 x 4 memory chip?
a. 10
b. 11
c. 8
d. 12
     2. The octal equivalence of 111010 is
a. 81
b. 72
c. 71
d. None of above
   •   The most commonly used standard data code to represent alphabetical, numerical and punctuation characters used in electronic data processing system is called
a. ASCII
b. EBCDIC
c. BCD
d. All of above

   •   The Width of a processor’s data path is measured in bits. Which of the following is not a common data path width? State the reason in a sentence
a. 8 bits
b. 12 bits
c. 16 bits
d. 32 bits
   •   The word length of a computer is measured in
a. Bytes
b. Millimeters
c. Meters
d. Bits
   •   The left side of any binary number is called:
a. Least significant digit
b. Most significant digit
c. Medium significant digit
d. low significant digit
   •   A nibble can be represented in the form of:
a.                   Octal digit
b.                  Decimal
c.                   Hexadecimal
d.                  None of these

Problem 8.
Explain the following sets of instructions and what will be the outcome?
org      $2000;
Ldd     $1502;
Subd   $1506;
Std      $1501;

Ldaa   $1501;
Sbca   $1505;
Staa    $1511;

Ldaa   $1500;
Sbca    $1504;
Staa     $1510;
End    
Problem 9.
Write a program to add numbers stored in memory locations $ 2000, $2001, $2002 and save the result in memo $2010.
Problem 10.
Write a program to subtract the contents of the memory locations at $1005 from the sum of the memory locations at $1000 and $1002, and store the difference at $1010. Then, show the flow chart of the program ( include the comments).

Solutions

Expert Solution

Problem 7:option b

11 address lines are needed to address each machine location in a 2048 X 4 memory chip.

It means that a memory of 2048 words, where each word is 4 bits. So to address 2048 (or 2K, where K means 2^10 or 1024), you need 11 bits, so 11 address lines. To express in very easy terms, without any bus-multiplexing, the number of bits required to address a memory is the number of lines (address or data) required to access that memory. Quoting from the Wikipedia article, a system with a 32-bit address bus can address 232 (4,294,967,296) memory locations.

* Option b

The octal equivalence of 111010 is 72.

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).

It comes from the Latin word for eight. The octal numbering system uses the numerals 0-1-2-3-4-5-6-7. In computing environments, it is commonly used as a shorter representation of binary numbers by grouping binary digits into threes. The chmod command in Linux or UNIX uses octal to assign file permissions.

Binary and Octal. In 1679, Gottfried Leibniz invented the binary numeral system, and published the first information about it in his article "

* Option a

8 bits....

*option a

ASCII....

* Option d

Word length in computer measured in bits...

*Option b

Most significant digit

* Option c

Hexadecimal


Related Solutions

Solve part (c) and (d) of this problem below: XYZ plc has been offered the following...
Solve part (c) and (d) of this problem below: XYZ plc has been offered the following quotes for options on the dollar given a current market price of 60 pence: Strike price of dollar in pence Call premium Put premium                                            1 year           1 year 62                                        6.9               3.0 64                                        5.9               3.8 66                                        4.8               4.5 67                                        4.5               5.1 a. Calculate the net payout from a purchased call option at a strike price of 67 pence for the following possible maturity prices...
PART A                                         &nb
PART A                                                                    Required: Advise E Pty Ltd regarding the Fringe Benefits Tax implications of the facts below. You are not requiredto calculate the actual FBT liability. E Pty Ltd is an engineering firm that employs Naomi, who is entitled to a salary of $150,000. She reaches a salary sacrifice arrangement with E Pty Ltd where, in exchange for giving up part of her salary, E Pty Ltd will pay for: A laptop (that she can keep) that she intends to...
PART A                                         &nb
PART A                                                                  Required: Advise Jake of the tax payable due to the receipt of the dividends. Jake receives the following dividends on 1 August 2020: $8000, fully franked from ABC Ltd. $3000, 50% franked, from DEF Ltd. Jakes is on the top (45%) marginal tax rate. Ignoring Medicare Levy, calculate the impact of the dividends on Jake’s tax liability. PART B                                                                   Required: Advise as to the tax implications for these facts regarding the Kim Family Trust. You do not need...
PART A                                         &nb
PART A                                                                                                            Required: Advise Katie as to: a) the deductibility of the $20,000; and b) whether the $1,200 and $1,000 are deductible as specific deductions. Where appropriate, support your answer with legislative and judicial authority. Katie owns a retail store (as a sole trader) that repairs smartphones and laptops. To save costs, Katie often uses substandard equipment to repair such items. One of her employees, being tired of such unethical behaviour, quits and threatens to go to the...
Part A                                         &nb
Part A                                                                                                                      You are working as an accountant for Bronson, Lazenby & Dalton and the senior partner has asked you to prepare a report answering the following questions about consolidation procedures for a client: Follyfoot Ltd has a 33% interest in the share capital of Cue Ltd, which is a company involved in the same industry as Follyfoot Ltd. The remaining share capital is owned by Mr and Mrs Lewelyn who are the founders of Cue Ltd. Mr and Mrs...
PART B                                         &nb
PART B                                                                                                            Required: Briefly advise Dan as to the deductibility of the $10 000, $4000, $20 000, and $3000 amounts. Where appropriate, support your answer with legislative and case authority, as well as calculations. Dan works as a junior pharmacist in Melbourne. He was caught inappropriately taking some prescription drugs to use for recreational purposes. As a punishment, he had to pay a $10,000 fine. Further, he had to, as part of his punishment, undertake community service (unpaid)...
The code below is giving an arithmetic overflow. Correct the below given the below code, so...
The code below is giving an arithmetic overflow. Correct the below given the below code, so that the value of s0 is printed before calling the function fun1, inside the function Fun1 and after returning from Fun1 in main. Upload the corrected .asm or .s file in the drop box. .text main: addi $s0,$zero,2 jal Disp jal Fun1 jal Disp j Exit Fun1: addi $sp,$sp,-4 sw $s0,0($sp) addi $s0,$s0,15 jal Disp lw $s0,0($sp) addi $sp,$sp,4 jr $ra Disp: li $v0,1...
In Python I have a code: here's my problem, and below it is my code. Below...
In Python I have a code: here's my problem, and below it is my code. Below that is the error I received. Please assist. Complete the swapCaps() function to change all lowercase letters in string to uppercase letters and all uppercase letters to lowercase letters. Anything else remains the same. Examples: swapCaps( 'Hope you are all enjoying October' ) returns 'hOPE YOU ARE ALL ENJOYING oCTOBER' swapCaps( 'i hope my caps lock does not get stuck on' ) returns 'I...
Problem 8 is this: Your factory has been offered a contract to produce a part for...
Problem 8 is this: Your factory has been offered a contract to produce a part for a new printer. The contract would be for three years and your cash flows from the contract would be $5 million per year. Your up-front setup costs to be ready to produce the part would be $8 million. Your cost of capital for this contract is 8%. a. What does the NPV rule say you should do? b. If you take the contract, what...
A farmer has been given the opportunity to become a part owner in a local fertilizer...
A farmer has been given the opportunity to become a part owner in a local fertilizer business. If the farmer becomes an owner of the fertilizer business, he will receive $4,000 each year from the firm's profits. In addition, the farmer will receive a discount on fertilizer and he believes the discount will reduce his fertilizer costs by $2,000 per year. The farmer plans to retire in 25 years and thinks he can sell his equity in the fertilizer business...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT