Write a small program using floating-point operations, Computer Engineering

Assignment Help:

Question:

a) Write a small program using floating-point operations in Reverse Polish Notation to evaluate the following:

Volume of Sphere = (4/3)πr3

Consider that the user will enter a positive real number for the radius.

Example Run: Enter radius: 2.3

Volume: 16.2226666667

b) Translate the following pseudo-code into optimized assembly code:

IF ((X > 5) AND (Y < 0)) OR (Z <= 13) THEN A = 10 ELSE A = 2

c) Write a program to that will prompt the user to enter a positive decimal number. You must then display the binary equivalent on screen.

An example run would be:

Enter decimal number: 34

Answer: 000000000010001


Related Discussions:- Write a small program using floating-point operations

What are the advantages of public key cryptography, What are the advantages...

What are the advantages of Public Key Cryptography? Advantages of Public Key Cryptography are illustrated in below: a) Increased convenience and security and b) Electro

Perfect fundamental logic - artificial intelligence, Perfect fundamental lo...

Perfect fundamental logic - artificial intelligence: However, while it's theoretically  possible to do definite intelligent things (like prove some easy mathematics theorems a

Binary constraints, Binary Constraints: Alternatively unary constraint...

Binary Constraints: Alternatively unary constraints specify that a particular variable can take certain values that basically restricts the domain for that variable thus shoul

Reprographic technologies, Reprography: Reprography, as a term, has ga...

Reprography: Reprography, as a term, has gained international recognition in 1963. It includes "photocopying , microcopying, duplicating and in-plant printing and is character

Explain the working of a demultiplexer, Explain the working of a demultiple...

Explain the working of a demultiplexer with the help of an example. Ans: 1:4 Demultiplexer: Fig.(a) demonstrates the logic circuit of a 1:4 demultiplexer. This has two NOT

Explain the program invisible registers, What are program invisible registe...

What are program invisible registers? Global and local descriptor tables are found in memory system. In order to specify and access the address of these tables, program invisi

How to select a table, Q. How to select a table? The easiest way to sel...

Q. How to select a table? The easiest way to select a table in Standard view is by using tag selector, which displays HTML tags of elements in document. You will use tag sel

What is frontpage, Front page is a software used to make a webpage.

Front page is a software used to make a webpage.

What is input - output instructions, Q. What is Input - Output Instructions...

Q. What is Input - Output Instructions? An I/O instruction is stored in memory of computer and is fetched as well as executed by processor producing an I/O-related command for

Write Your Message!

Captcha
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