6. (15) Write an ARM assembly language code segment that will compute 4-bit binary signed-magnitude subtraction. Use all

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

6. (15) Write an ARM assembly language code segment that will compute 4-bit binary signed-magnitude subtraction. Use all

Post by answerhappygod »

6 15 Write An Arm Assembly Language Code Segment That Will Compute 4 Bit Binary Signed Magnitude Subtraction Use All 1
6 15 Write An Arm Assembly Language Code Segment That Will Compute 4 Bit Binary Signed Magnitude Subtraction Use All 1 (50.91 KiB) Viewed 16 times
6. (15) Write an ARM assembly language code segment that will compute 4-bit binary signed-magnitude subtraction. Use all of Port B for inputs and outputs; where the first nibble (PBO – PB3) represents the subtrahend (bottom number), the second nibble (PB4 - PB7) represents the minuend (top number), and the third nibble (PB8 – PB11) represents the difference. Remember in subtraction that: Difference = Minuend - Subtrahend. The program needs to output the signed magnitude result (not the twos- compliment result) to the output pins. If the result is negative, port B, bit 12 (PB12) should be activated (turned on) to represent a negative sign, otherwise PB12 should be turned off to represent a positive result. The program will continuously monitor (poll) the input and update the output accordingly. Use indirect addressing mode instructions for reading the input and writing to the output. You do not need to set up the ports (DDR, Clock, etc.), simply use them as you can assume that they have been taken care of beforehand using a device driver routine. You should refer to the 16-bit port as PORTB in your program.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply