CSE6040x Sample solutions _ Solution_ Notebook 4 _ Courseware Georgia Institute Of Technology questions and answers
CSE6040x Sample solutions _ Solution_ Notebook 4 _ Courseware Georgia Institute Of Technology questions and answers Sample solutions Part 0: Representing numbers asstrings The following exercises are designed to reinforce your understanding of how we can view the encoding of a number asstring of digitsin a given base. Integers asstrings Consider the string of digits: '' If you are told this string isfor a decimal number, meaning the base of its digitsisten (10), then its value is given by []10 = (1 × 1010) + (6 × 109 ) + (1 × 108 ) + ⋯ + (8 × 101 ) + (7 × 100 ) = 16,180,339,887. Similarly, consider the following string of digits: '' If you are told this string isfor a binary number, meaning its base istwo (2), then its value is []2 = (1×2 8 )+(1×2 5 )+⋯+(1×2 1 ). (What isthis value?) And in general, the value of a string of d + 1 digits in base b is, d [sdsd−1 ⋯s1s0 ]b = ∑si × b i . i=0 Bases greater than ten (10). Observe that when the base at most ten, the digits are the usual decimal digits, 0, 1, 2, ..., 9. What happens when the base is greater than ten? For this notebook, suppose we are interested in bases that are at most 36; then, we will adopt the convention of using lowercase Roman letters, a, b, c, ..., zfor "digits" whose values correspond to 10, 11, 12, ..., 35...
Written for
- Institution
-
Georgia Institute Of Technology
- Course
-
CSE 6040X
Document information
- Uploaded on
- January 12, 2024
- Number of pages
- 15
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Unknown
Subjects
- cse6040x sample solutions
- cse6040x
-
cse6040x sample solutions solution