Assembly program to translate an input number to its binary

Assignment Help Assembly Language
Reference no: EM131109596

(4_1) submit this hw by "./submit lastname4_1.s hw4_1" Write a program to find and print a factorial numbers:

fac(l) = 1, fac(n) = fac(n 1) * n (it 2) Your program should prompt the user to enter a number n and print out the sequence: 

f ac(1), fac(2),.., fac(n). Your program should repeatedly prompts the user for retry.

Here is what the user will see when the program is executed:

This program prints the factorial sequence:

Enter a number: 5

1 2 6 24 120

Would you like to try again(Y/N):Y

Enter a number: 3 126

 Would you like to try again(Y/N):

(5)Write an assembly program to translate an input number to its binary represen­tation. Your program should repeatedly prompts the user for an input and display the input in binary form, until the user chooses to quit.

Note: For positive number, do not show leading zeros..

Here is what the user will see when the program is executed:

This Program prints the binary equivalent of a decimal number

Please enter a number:78

Binary number = 1001110

Would you like to try again(Y/N):Y

Please enter a number: 78

Binary number = 11111111111111111111111110110010

Would you like to try again (Y/N):

Reference no: EM131109596

Questions Cloud

Derive the aggregate demand curve : Show how you can derive the Aggregate demand curve when the Price level in an economy increases. By drawing separate graphs indicate how a change in the price level impacts, money market, investment demand, goods market and then draw the aggregate de..
Discuss whether martin will be unjustly enriched : Do Maria and Jose have a successful argument for a quasi-contract to recover the amount they spent to build the garage? Discuss whether Martin will be unjustly enriched
Decrease the short-term interest rate in europe : On June 5, 2003, the European Central bank acted to decrease the short-term interest rate in Europe by half a percentage point, to 2 percent by increasing the money supply through open market operations. What effect did the bank hope the action (of c..
Economics of the so-called superstar effect in labor market : Which of the following statements best defines the economics of the so-called superstar effect in the labor market?
Assembly program to translate an input number to its binary : (4_1) submit this hw by "./submit lastname4_1.s hw4_1" Write a program to find and print a factorial numbers:(5)Write an assembly program to translate an input number to its binary
Discus the aforementioned circumstances : In certain circumstances, the court cannot grant an absolute discharge. Briefly discus the aforementioned circumstances in regards to study of business law
Calculate the break-even poin : Given the information below, calculate the break-even point. is this a good estimate of when your company will become profitable? A. labor rate 10.00/hr. B. Avg. # of yards mowed 1/hr. C. Fuel used 1.5 gallon/yd. D. Fuel cost 4/21/16 2.01/gallon E. E..
How is a court most likely to rule explain : College Copy Shop (CCS) compiles, copies, and sells reading materials to students on the instructions of their professors, who indicate which parts of which publications should be included. How is a court most likely to rule? Explain
The burden of a tax is mainly borne by the buyer : The burden of a tax is mainly borne by the buyer if: a. the demand for the good is relatively price elastic. b. the supply of the good is perfectly price elastic. c. the supply of the good is relatively price elastic. d. the demand for the good is re..

Reviews

Write a Review

Assembly Language Questions & Answers

  Write code for an assembly language function

Write code for an assembly language function named rot_left which rotates a given integer (provided in R6 by a value given in R12. The result should be returned in R4.

  Write an isr and startup code for a system

Write an ISR and startup code for a system that lights up LED0 on a PSoC Eval1 board (suppose that a wire is connecting P1[0]) to show "Low Voltage" whenever there is a supply voltage monitor interrupt.

  Create a program that uses ia-32 assembly language

create a program that usesIA-32 assembly language. It converts integers in the array X to its hex string ad save its to array Y in the respictive locations.

  Write a program in assembly language which uses bios

write a program in assembly language which uses bios interrupt int 21 to read current system time and displays it on

  Study code and find how two dimensional array is accessed

Create a procedure called calc_col_sum which uses the same registers as the original procedure EBX ECX EDX ESI - The procedure return value should be in EAX.

  Create a procedure named validatepin that receives a pointer

Create a procedure named ValidatePIN that receives a pointer to an array of bytes containing a 5-digit PIN from your main proc. You are required to use the four byte arrays samplePin_1, samplePin_2,samplePin_3 and samplePin_4 declared below.

  Prepare an assembly program that reads in a number of cents

prepare an assembly program that reads in a number of cents. the program will write out the number of dollars and cents

  Write a function in linux assembly

Write a function in Linux assembly

  Create a simulated ant colony

You are going to create a simulated ant colony, in which the user will take the role of the queen who's duty it will be to manage the health of the colony. The simulation will proceed in a turn-based fashion, where each turn the user can choose to..

  Give the initial value of the control register

Assume 8255’s PA=out, PB=in, PCL(PC0-PC3)=in, and PCU(PC4-PC7)=out, the port address of A,B,C and the Control Register are 300H-303H respectively. Now if we want to get data from the port B and send it to port A, and get data from PCL then send it ou..

  Integral square root of an input number

Write a short assembly program that computes the integral square root of an input number and In this problem you will write a program that will compute the first 20 numbers in the Fibonacci sequence.

  Write an isr and startup code for a system that lights up le

Write an ISR and startup code for a system that lights up LED0 on the PSoC Eval1 board (assuming that a wire is connecting P1[0]) to indicate "Low Voltage"

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd