30 likes | 207 Views
Sidebar – Big Numbers In Chapter 5, we described factoring large numbers as a difficult problem and showed the decimal and binary representations (e.g., 155 decimal digits = 512 bits. How do we make this conversion?
E N D
Sidebar – Big Numbers In Chapter 5, we described factoring large numbers as a difficult problem and showed the decimal and binary representations (e.g., 155 decimal digits = 512 bits. How do we make this conversion? If n is a 5 digit number then 104< n < 105 (i.e., 105 = 100,000, so 99,999 Is less than 100k and 104 = 10,000 is the smallest possible. In binary: 2k-1 < 105< 2k ; where k is 17 satisfies this equation i.e., 216 = 65,536 (less than a full 5 digit number) 217 = 131,072 (requires 17 bits to fully express 99,999) Big Numbers
Sidebar – Big Numbers Trouble is this calculation is difficult or overflows most simple calculators for large numbers. So use: ln(2k-1) < ln (105) < ln (2k) and since ln(ax) = xlna; ln(2k-1) < ln (105) < ln (2k) this becomes (k-1) ln 2 < 5 ln 10 < k ln 2 So… k-1 < (5 ln 10)/ln2 < k And k-1 < (5 x 2.3)/.693 < k k-1 < 16.6 < k Since binary must by even bits, the answer is 17 bits Big Numbers
Sidebar – Big Numbers For 155 decimal digits (k-1) ln 2 < 155 ln 10 < k ln 2 So… k-1 < (155 ln 10)/ln2 < k And k-1 < (155 x 2.3026)/.6931 < k k-1 < 514.937 < k Since binary must by even bits, the answer is 515 bits. Big Numbers