92 CHAPTER 2 Discrete Mathematics
Example 3. The representation of 11111 in trinary would require 9
trinary digits since log 311111 ≈ 8. 48 .Specifically,
11111 = 3^8 + 2· 37 + 2· 34 + 3^2 + 3 + 2,
which says that 11111 3 = 12 002 0112.
In computer science numbers are sometimes representation in hex-
adecimal notation (base 16); the “digits” used are 0, 1, 2, 3, 4, 5, 6, 7,
8, 9, A, B, C, D, E, F. Therefore 17 16 = 11, 1516 = F, 20616 = CE
Exercises
- Compute representations of 1435
(a) in binary;
(b) in ternary;
(c) in quarternary (4-ary)
(d) in hexadecimal
- Compute representations of 10,000
(a) in binary;
(b) in ternary;
(c) in quarternary (4-ary)
(d) in hexadecimal - The largest known Mersenne prime^20 is the number 2^43 ,^112 ,^609 −1.
Compute the number of decimal digits needed to represent this
huge prime number. Compute the number of binary digits (trivial)
and the number of ternary digits needed for its representation. - Here’s a bit of a challenge. Represent the decimal .1 (= 101 ) in
binary. What makes this a bit of a challenge is that in binary, the
decimal representation is an infinite repeating decimal (or should
I say “bi-cimal”?). As a hint, note that 10 2 = 1010. Now do a
long division into 1.^21
(^20) As of August, 2008; this is a prime of the form 2p−1, wherepis prime.
(^21) The answer is. 000 1100.