Topics - LC 3 - 102022
Topics - LC 3 - 102022
2. Write a program to manage stack of integers with all operations needed such
as push, pop, check top of stack, …, then do the application of Polish
notation calculator with at least 6 operations such as addition, ….
Attention:
- integers are arbitrary, positive and negative
- You need to look for all operations on stack to solve the application:
push, pop, check full/empty, check to see value on the top, …
- The Polish notation calculator operations: add, substract, multiply,
integer divide, square root, and power.
- Program must display the result to screen.
4. Write the program to input a string of characters (subroutine 1), check if this
string has any redundant blank among words, remove them (subroutine 2),
then print it out on the screen of the computer (subroutine 3).
Attention:
- Subroutine 1 is designed without using any TRAP inside, you must use
KBSR, KBDR with the pooling process to input.
- Subroutine 3 is designed without using any TRAP inside, you must use
DSR, DDR with the pooling process to input.
For example:
Input: “ I go to school ”
Output: “I go to school”
7. Write a program to input two sequences of 32 binary digits (‘0’ and ‘1’).
Convert this sequences to IEEE 754 of floating point number of 2 locations
(32 bits) in memory. Write 4 subroutines to compute the sum, difference,
product and quotient of these numbers.
Output the result of each operation above to the screen.