Question: This is for part B This project is divided into two parts: 1 ) Design document, and 2 ) Assembly program. In the design document
This is for part B This project is divided into two parts: Design document, and Assembly program. In the design document phase, you will submit a typed description of problemsolving approaches and algorithm used to solve the given problem. In the assembly program phase, you will write the class version of assembly language program to code and test the given problem.
Problem Statement:
Given a digits hexadecimal number n as user input, write an assembly language program to display T if the first digits group or the second digits group number is mathbf or if their sum is mathbf Otherwise, the program should display the biggest digits number out of the two numbers in decimal.
n user input will be exactly a fourdigits hexadecimal number, not more and not fewer. Here are the examples:
Take the input n user input as mathrmFFO your program will first convert mathrmFF to decimal equivalent and convert to decimal equivalent after that your program should output T since one of the numbers is
If n user input is mathrm~B your program will first convert to decimal equivalent and convert B to decimal equivalent and then your program should output T since the sum of both is a mathbf
If n user input is your program will first convert to decimal equivalent and convert to decimal equivalent and then your program should output since both numbers are not the sum of both is not and the biggest number of the two numbers is
If n user input is mathbfA mathrmC your program will first convert mathbfA mathbf to decimal equivalent mathbf and convert mathrmC to decimal equivalent and then your program should output since both numbers are not the sum of both is not and the biggest number of the two numbers is
You need to take the input characters using INP in Assembler, convert the input characters into hexadecimal numbers, check the numbers and their sum, have a loop to output the number. You should not hardoode the inputoutput numbers and should not use the direct formula to get the result. For example, a code such as this: if mathrmn then printf; is not allowed.
Hint:
The following pseudocode demonstrates the logic for checking the equality and sum of from digit groups of number n where n is the given input. Please note that this program utilizes lowlevel functions not readily available in the assembly language, such as: conversion of ASCIIhexadecimal value to numerichexadecimal value, integer division, and modulus operation.
char hex; Array to store the digit hex number plus null terminator
int num num;
Input digit hexadecimal number
printfEnter a digit hexadecimal number: ;
scanfs hex; Read exactly & characters
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
