Tsn1101 computer architecture and organization - write a


Programming Exercise

1. Perform the following operations by writing programs using ARM instructions.

34,25,15,23,45,64,56,23

a. Sort the numbers above in descending order using bubble sort.

b. Sort the numbers above in ascending order. (Hint: Modify the subroutine in part [a] by checking the flag values after the compare operation)

The following questions are to be included in the report only.

2. Write a program in ARM Assembly Language Program to check 2 Sets of temperature readings.

Input: 2 sets of temperature readings (1 set has 6 readings, both sets are located at 2 different contiguous sets of memory addresses)
Output:
- Store ‘AAH' if all the temperature reading of the 1st set is higher that the corresponding readings of the 2nd set.
- Store ‘BBH' if any one of the readings in the 1st set is lower than its corresponding reading of the 2nd set.
- Store ‘CCH' if any one of the readings in the 1st set is equal to its corresponding reading of the 2nd set.

3. Write a program to perform Binary to BCD conversion in ARM Assembly Language.

Input: 8-bit binary number.

Output: BCD equivalent. Store in consecutive memory addresses.

Process:
- Step 1: If the number is less than 100, go to Step 2, else subtract 100 repeatedly (divide by 100) repeatedly until remainder is less then 100. Quotient is the most significant BCD digit, BCD3.
- Step 2: If the number is less than 10, go to Step 3, else subtract 10 repeatedly (divide by 10) repeatedly until remainder is less than 10. Quotient is BCD2.
- Step 3: The remainder from Step 2 is BCD3.

4. Assume that a processor employs a memory address register (MAR), a memory buffer register (MBR), a program counter (PC), and an instruction register (IR). List the symbolic sequence of micro-operations for the fetch cycle.

5. Your ALU can add its two input registers, and it can logically complement the bits of either input register, as well as increment the value of either input registers, but it cannot subtract. Numbers are to be stored in two's complement representation. List the micro- operations your control unit must perform to cause a subtraction. (Consider the instruction SUB R1, X, which subtracts the contents of location X from the contents of register R1, and places the result in R1.)

6. In caches, direct mapping is one of the mapping functions used. What is the advantage and disadvantage of this technique?

7. An I/O module is used to link external devices to the computer. What are the FIVE major requirements for an I/O module?

8. Suppose an 8-bit data word stored in memory is 01000011. Using the Hamming algorithm, determine what check bits would be stored in memory with the data word. Show how you got your answer.

Attachment:- programming exercise.rar

Request for Solution File

Ask an Expert for Answer!!
Assembly Language: Tsn1101 computer architecture and organization - write a
Reference No:- TGS02646072

Expected delivery within 24 Hours