On every assignment, write your name leglbly as it appears on your t, Excepions
ID: 3903338 • Letter: O
Question
On every assignment, write your name leglbly as it appears on your t, Excepions will be made only by eeon Exceptions will be made only by advance ts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist at the start of class on the day indicated (Tuesday or Thursday) arran gement (e in 14 MLHUE for help). Never push homework under someone here are integer operations. This is an informal expression of the function, that is. pseudocode; it function f( i, j ) 1 A test of your understanding of the prerequisites: Consider this recursive integer function. All operators is not coded in a real programming language: if io return else return f i, i-1 + 1 a)What is the value of f ( 1, 1)?(0.2 point) b)What is the value of f (2,3)7(0.2 point) c) What is the value of f (5,8)? (0.2 point) d) What is the value of f (13,21)? (0.2 point) e) Give a short (20 words suffice) intuitive description of what this function does, not how it does it. (Hint: Ignore the code, look at your answers to parts a to e.) (0.2 point) 2. A test of your understanding of the prerequisites: Here is another pseudocode fragment: operation o(x,y) neither x nor y may be nul1 temp x.next y.next temp y.back x temp.backy A Question: This code performs an elementary operation on a common data structure. Name that operaton and name the data structure. (A 5 to 10 word answer will suffice.) (0.5 points) 3. A problem based on Chapter 2: Give the 7-bit ASCII representation of the text "Jun. 14, 2018 Don't include the quotation marks. Give your result as a column of binary numbers, one per character. (0.7 points) 4. Background: Take the due date, 06/12/2018, take out the slashes and interpret it as the decimal number 6122018 a) Convert this to binary using the pen and paper method shown in Chapter 2. Show your work! (0.4 points) b) Convert your answer from part A to hexadecimal. (04 points) You can check your work in the above conversion problems by using any binary-hex-decimal conversion calculator, but you will be expected to be able to do such conversions by hand.Explanation / Answer
If you have any doubts, please give me comment...
1)
a) 2
b) 5
c) 13
d) 34
e) this function will do the sum of the two numbers using recursion method
2)
temp <-> x.next <-> y <-> temp
It represents circular double linked list
3)
Ascii values are: 74 117 110 46 32 49 52 44 32 50 48 49 56
1001010 1110101 1101110 0101110 0100000 0110001 0110100 0101100 0100000 0110010 0110000 0110001 0111000
4)
6122018
3061009 Rem: 0
1530504 Rem: 1
765252 Rem: 0
382626 Rem: 0
191313 Rem: 0
95656 Rem: 1
47828 Rem: 0
23914 Rem: 0
11957 Rem: 0
5978 Rem: 1
2989 Rem: 0
1494 Rem: 1
747 Rem:0
373 Rem:1
186 Rem: 1
93 Rem: 0
46 Rem: 1
23 Rem:0
11 Rem:1
5 Rem: 1
2 Rem:1
1 Rem: 0
0 Rem: 1
Remainders in reverse order is: 10111010110101000100010
6122018 in Binary is: 10111010110101000100010
16 6122018
382626 Rem: 2
23914 Rem: 2
1494 Rem:A
93 Rem: 6
5 Rem: D
0 Rem:5
Revese order is: 5D6A22
6122018 in hex is: 5D6A22
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.