Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you guys explain those problems to me? Thank you! Homework #2 Due Thursday,

ID: 3802052 • Letter: C

Question


Can you guys explain those problems to me? Thank you! Homework #2 Due Thursday, March 9 1. Strings of characters (or words, sentences, etc.) can be represented as single integer values by treating their characters as digits of some large base. For example, using and assigning the values A-0, B 1, C 2, Z-25, can represent my initials as a number in the following manner: 9.262 23* 261 7 26 6689 JXH-o (9) 23007) a) Translate your initials into a base ten number as I did above (show me the steps). If you do not have a middle initial, use "X". 2. Although the first manned spaceship to land on Venus found no signs of current life, they did find the ruins of an ancient stone wall with the following formula engraved on its face: 123 432 1110 Assuming the individual characters all represent the same things as in our notation, how many total digits (fingers and thumbs) should the Venusians have (on whatever they used for hands)? Explain how you arrived at your conclusion. HINT: You need to determine in what base the formula makes sense. 3. Assume we have a 16-bit computer. For signs, "1" represents negative. Floating-point representation uses 1 bit for the sign, 5 bits for the exponent, and 10 bits (plus one hidden bit) for the significand. The exponent is stored in excess-15. Give answers to a) and b) below for each of the following formats (total of 8 answers): fi: unsigned integer f2: sign-magnitude integer f3: 2's complement integer f4: floating point a) The contents of two adjacent bytes are described by the base 16 value AB5016. For each of the formats above, give the value in base 10 of the number that these bytes would represent in the given format. b) Express the value 159210 in each of the formats above. Give your answers in 4-digit base 16 that represents the bit patterns of the respective formats.

Explanation / Answer

1). Let your initials be XYZ :

We will take numberings of alphabet A = 0 , B=2 ...Z = 25

So XYZ = (23)(24)(25) = > They are in base 26 because maximum number is 26 and again it sets to 0

So Converting them to base 10 , Start from left number : i.e 25
So , 25 * (26)0 + 24 * (26)1 + 23 * (26)2
=> 16197 in base 10
=> (16197 )10


Now if we want to convert them into base 8 , we need to divide the number by 8 and then print the remainder ate each step in reverse directoin,
See How
x(y) : x is the quotient and y is the remainder

16197 / 8 = we get 2024 (5 )
2024 / 8 = we get 253 (0 )
253 / 8 = we get 31 (5 )
31 / 8 = we get 3 (7 )
3 / 8 = we get 0 (3 )
Print in reverse direction of remainder : we get. 375058

Similarly we can do the same for base 2 ,
16197 / 2 , Proceed in this manner to get remainders and then print the remainder in oprrositive order i.e bottom to top

We get 111111010001012
================================================================================

2) 123 + 432 = 1110

As we dont know they are in which base , let the base be b
123b + 432b   = 1110b


Now expanding them in base 10 , we get

3 * b0 + 2* b1 + 1* b2    + 2 * b0 + 3* b1 + 4* b2 =    0* b0 + 1* b1 + 1* b2 + 1* b3
=> 3 + 2b + b2 + 2 + 3b + 4* b2 = b + b2 + b3
=> 5 +5b + 5b2 = b + b2 + b3
=> b3 - 4b2 - 4b -5 = 0
By putting b=5 , it satisfied the equation, Hence the Base is 5
Which is the answer.

Thanks, let me know if there is any concern.