computer science

computer science
Paper instructions:

CSCI 101: Intro to Computer Science
Assignment 5. Due: Mon, Jul 14
Solutions will be posted on Wed, Jul 16

Please save your work in a single text file hw5.txt and put on server before midnight of the day above. Check here for instructions how to upload the files.

(3×5=15 points) Convert the following binary numbers to decimal:
1111
101001
110011

(3×5=15 points) Convert the following decimal numbers to binary:
45
258
1111

(2×5=10 points)
Convert the following HEX number to decimal: CAB
Write your first name in ASCII code.

(2×10=20 points) Write PIPPIN programs to perform the following tasks:
Swap the contents of cells 5 and 6
Compute the absolute value |X| of a number stored in a cell X. The absolute value is defined as follows:

if X > 0, then |X| = X
if X < 0, then |X| = -X

For example, 5 > 0, so |5| = 5.
On the other hand, -3 < 0, so |-3| = -(-3) = +3.

(20 points) Write a PIPPIN program to compute X=(A+B)*(C+D), assuming A,B,C,D, and X are stored in cells 100, 101, 102, 103, and 104 respectively.

(2×10=20 points) Draw the parse trees for the following algebraic expressions:
((x + y) + z) * (x + z)
1 + (2*(1 + 2*(1 + x)))
You can use Paint to draw the parse trees, or just type them in the text mode. For example, following the second approach a parse tree for the expression (a + b) * c should look like this:

a b
\ /
+ c
\ /
*

Make sure to doublecheck that your file is on the server.

Check here for resolving possible problems with the server.

PLACE THIS ORDER OR A SIMILAR ORDER WITH US TODAY AND GET AN AMAZING DISCOUNT 🙂

 

© 2020 customphdthesis.com. All Rights Reserved. | Disclaimer: for assistance purposes only. These custom papers should be used with proper reference.