{ localUrl: '../page/digit_exchange_rates.html', arbitalUrl: 'https://arbital.com/p/digit_exchange_rates', rawJsonUrl: '../raw/427.json', likeableId: '2615', likeableType: 'page', myLikeValue: '0', likeCount: '5', dislikeCount: '0', likeScore: '5', individualLikes: [ 'AlexeiAndreev', 'EricBruylant', 'NateSoares', 'EricRogstad', 'SzymonSlawinski' ], pageId: 'digit_exchange_rates', edit: '18', editSummary: '', prevEdit: '17', currentEdit: '18', wasPublished: 'true', type: 'wiki', title: 'Exchange rates between digits', clickbait: 'In terms of data storage, if a coin is worth $1, a digit wheel is worth more than $3.32, but less than $3.33. Why?', textLength: '10040', alias: 'digit_exchange_rates', externalUrl: '', sortChildrenBy: 'likes', hasVote: 'false', voteType: '', votesAnonymous: 'false', editCreatorId: 'NateSoares', editCreatedAt: '2016-06-24 05:02:48', pageCreatorId: 'NateSoares', pageCreatedAt: '2016-06-09 01:19:21', seeDomainId: '0', editDomainId: 'AlexeiAndreev', submitToDomainId: '0', isAutosave: 'false', isSnapshot: 'false', isLiveEdit: 'true', isMinorEdit: 'false', indirectTeacher: 'false', todoCount: '5', isEditorComment: 'false', isApprovedComment: 'true', isResolved: 'false', snapshotText: '', anchorContext: '', anchorText: '', anchorOffset: '0', mergedInto: '', isDeleted: 'false', viewCount: '433', text: '[summary: There is a natural exchange rate between types of digits. For example, a 100-digit is worth exactly twice as much as a 10-digit, because you can build a 100-digit out of two 10-digits. Furthermore, a 10-digit is worth between 3x and 4x as much as a 2-digit, because you can emulate a [-42d] using between 3 and 4 coins. The cost of an $n$-digit in terms of $b$-digits is $\\log_b(n).$]\n\nLet's say that you want to [storing_numbers store a lot of data], using physical objects such as coins, dice, or [42d digit wheels]. For concreteness, let's say that you're going to be given an arbitrary number between one and $2^\\text{3,000,000,000,000}$ ([numbers_are_data a.k.a. a terabyte of data]), and you need to make sure you have enough physical objects to write that number down.\n\nLet's say that a coin costs 1¢. Because [ $n$ coins can be used to encode any one of $2^n$ different possibilities], you could get the job done with three trillion coins, which would let you encode the number (in [binary_notation binary]) for the low low cost of thirty billion dollars. (At the time of writing this, three trillion bits of data will actually run you about \\$60, but leave that aside for now. Pretend you can't use modern transistors, and you have to use comparatively large objects such as coins to store data.)\n\nInstead of buying coins, you could also buy [42d digit wheels], and use those instead. Because digit wheels can store more values than coins, it takes fewer digit wheels than coins to do the job. If digit wheels also cost 1¢, you should just buy digit wheels; that will cost a mere $9B. If instead digit wheels cost a million dollars apiece, you should probably buy coins instead. Somewhere in between those two prices, digit wheels switch from being a good deal to being a bad deal. The question is, if coins are worth 1¢, then how much is a digit wheel worth? At what price should you buy wheels instead of coins, and at what price should you buy coins instead of wheels?\n\nAt a first glance, it may seem like the fair price is 5¢ per wheel. A coin can store two values (by being placed 'heads' or 'tails'), while a digit wheel can store ten. Ten is five times larger than 2, so perhaps the price of a digit wheel should be five times the price of a coin. However, if digit wheels cost 5¢, you should ignore digit wheels entirely and buy coins. Why? Because for only 4¢, you could buy four coins, which can hold $2^4=16$ different values. Four coins store a [4sj 16-digit], and a 16-digit is worth more than a 10-digit, so you would have no reason to even consider buying digit wheels at a price of 5¢ per wheel.\n\nSo what is the fair price for a digit wheel? 4¢ is still too high, because that makes a 10-digit cost the same as a 16-digit, and the 16-digit is always better at that price. What about 3¢? At that price, the answer is much less clear. On the one hand, spending 3¢ on coins gets you the ability to write down only 8 possibilities, while spending 3¢ on wheels lets you write down 10 different possibilities. On the other hand, if you're trying to store the number 101, you need either 7 coins (7¢, because $2^6 < 101 < 2^7$) or 3 wheels (one per digit, because a wheel stores a digit, for a total of 9¢), in which case the coins are better.\n\nGiven that digit wheels can store ten values and cost 3¢ each, and coins can store two values and cost 1¢ each:\n\n__Question:__ When storing the number 8000, should you buy coins or wheels?\n\n%%hidden(Answer):\nWheels. To store 8000, you need 13 coins (because $2^{12} < 8000 < 2^{13}$) for a cost of 13¢, but only 4 wheels (because 8000 is 4 digits long) for a cost of 12¢.\n%%\n\n__Question:__ When storing the number 15,000, should you buy coins or wheels?\n\n%%hidden(Answer):\nCoins. Storing 15,000 costs 14 coins ($2^{13} < 15,000 < 2^{14}$) or 5 wheels; given that wheels cost 3¢ and coins cost 1¢, the 14 coins are cheaper.\n%%\n\n__Question:__ When storing the number 230,000, should you buy coins or wheels?\n%%hidden(Answer):\nIt doesn't matter. Storing 230,000 takes either 18 coins or 6 wheels, which costs 18¢ either way.\n%%\n\nAt 3¢ per digit wheel, whether you should buy coins or wheels depends on which number you want to store.\n\nBut _once the number you're storing gets large enough,_ the digit wheels become a better deal, and stay that way. In this case, the final transition happens when the number you're storing is 11 digits long or longer. Why? Say that the number $x$ you want to store is $n$ digits long in decimal notation. $n$ digit wheels can always encode more possibilities than $3n$ coins (because $10^n > 2^{3n}$ for all $n$), but sometimes $x$ can be written using fewer than $3n$ coins (as in the case of 15,000). This stops happening once $n$ is so large than $10^n$ is $2^3$ times larger than $2^{3n}$, at which point no $n$-digit number can be encoded using $2^{3(n-1)}$ or fewer coins. This happens once $n \\ge 11,$ i.e., once $x$ is at least 11 digits long. ([ Proof.])\n\nThis probably isn't too surprising: For 3¢ you can either buy 3 coins or one digit wheel. The coins store 8 possibilities, the wheel stores 10, and it's no surprise that a huge collection of 10-digits is unambiguously better than an equally sized collection of 8-digits. \n\nSo digit wheels are worth more than 3x as much as a coin, and less than 4x. How can we find the right price exactly? We could use exactly the same argument as above to check whether 3.5¢ is too high or too low, except that it's not clear what it would mean to buy "three and a half coins." We can get around that problem by considering ten-packs of coins vs ten-packs of digit wheels. If wheels cost 3.5¢ and coins cost 1¢, then with 35¢, you could either buy 10 wheels or 35 coins. Which encodes more possibilities? The coins, because $10^{10} < 2^{35}.$ Thus, by a [ generalized version of the argument above], for numbers sufficiently large, the coins are a better deal than the wheels — at that price, you should buy wheels.\n\nAs you can verify, $2^{33} < 10^{10} < 2^{34},$ so the fair price must be between 3.3¢ and 3.4¢. And $2^{332} < 10^{100} < 2^{333},$ so it must be between 3.32¢ and 3.33¢. We could keep going, and keep getting digits of the fair price. And we could keep going forever, because the fair price is [-irrational]. ([logs_are_usually_irrational Why?])\n\nIn general, if digit wheels cost $p$ times as much as coins, the [ general argument] we've been using says that if you're storing a large number and $2^p > 10$ then you should buy coins, whereas if $2^p < 10$ then you should buy digit wheels. Thus, the fair price must be the number $p$ such that $2^p = 10,$ and its first three digits are 3.32.\n\nIn other words, while a digit wheel holds 5 times as many values as a coin, it is only worth about 3.32 times as much as a coin (in terms of its ability to store data). Why? _Because it takes about 3.32 coins to emulate a digit-wheel._ What does that mean? Well, 3 coins is not enough to emulate a digit wheel (3 give you only 8 possibilities), 4 coins is more than enough (4 give you 16 possibilities). And 33 coins is not enough to emulate 10 digit wheels, but 34 coins are more than enough. And 332 coins are not enough to emulate 100 digit wheels, but 333 coins are more than enough.\n\nA digit wheel isn't worth 5 times as much as a coin because, when you buy multiple coins, their data storage capacity _multiplies,_ rather than adding. Each new coin lets you say _twice as many things,_ not just two more things. With five coins you can store $2 \\cdot 2 \\cdot 2 \\cdot 2 \\cdot 2 = 32$ different values, not $2 + 2 + 2 + 2 + 2 = 10.$ When finding the exchange rate between coins and digit wheels, the question is not "How many more values does a digit wheel have written on it?" Rather, the question is "How many coins does it take to emulate a digit wheel?" The answer to _that_ question is "More than 332 coins per hundred digit wheels, less than 333 per hundred."\n\nThe fair price $p$ of digit wheels (in terms of coins) is the number $p$ such that $2^p = 10$ exactly. We have a name for this number, and it's $\\log_2(10),$ and the argument described above is a [ simple algorithm for computing logarithms]. (Logarithm outputs are "difficult to calculate but useful to have," in general.)\n\nThus, we can look at $\\log_b(x)$ as describing the fair price of $x$-digits in terms of $b$-digits. For example, if coins are worth 1¢, then dice are worth $\\log_2(6) \\approx 2.58$ cents, as you can verify by checking that $2^2 < 6 < 2^3$ and $2^{25} < 6^{10} < 2^{26}$ and $2^{258} < 6^{100} < 2^{259}.$ (Exercise: Find the next digit of $\\log_2(6)$ using this method.)\n\nThis interpretation is a great intuition pump for what $\\log_b(x)$ "really means" if $b$ and $x$ are whole-numbers. Imagine two sets of objects, one (say, weird dice) that can be placed in $b$ different states, and another (say, weird wheels) that can be placed in $x$ different states. Imagine you're storing a really really large number, and imagine that the $b$-objects cost 1¢. At what price of $x$-objects would you be indifferent between using $x$-objects versus $b$-objects to store data? In other words, how many $b$-objects does it take to [emulating_digits "emulate"] an $x$-object?\n\nProbing this interpretation also explains many of the properties of the logarithm. For example, the fact that $\\log_b(x)$ is the fair price of $x$-digits in terms of $b$-digits immediately implies that $\\log_x(b) = \\frac{1}{\\log_b(x)}$, because if an $x$-digit is worth three $b$-digits then a $b$-digit must be worth a third of an $x$-digit.\n\nThis interpretation still doesn't shed light onto what logarithms are doing when their inputs are not whole numbers. For example, what's $\\log_{1.5}(2.5)$? What the heck would an object that can be placed into "1.5 different states" even be? As we will see shortly, this notion of there being a "natural exchange rate" between digits reveals an interpretation of the logarithm that explains what it's doing with fractional inputs.', metaText: '', isTextLoaded: 'true', isSubscribedToDiscussion: 'false', isSubscribedToUser: 'false', isSubscribedAsMaintainer: 'false', discussionSubscriberCount: '2', maintainerCount: '2', userSubscriberCount: '0', lastVisit: '', hasDraft: 'false', votes: [], voteSummary: 'null', muVoteSummary: '0', voteScaling: '0', currentUserVote: '-2', voteCount: '0', lockedVoteType: '', maxEditEver: '0', redLinkCount: '0', lockedBy: '', lockedUntil: '', nextPageId: '', prevPageId: '', usedAsMastery: 'false', proposalEditNum: '0', permissions: { edit: { has: 'false', reason: 'You don't have domain permission to edit this page' }, proposeEdit: { has: 'true', reason: '' }, delete: { has: 'false', reason: 'You don't have domain permission to delete this page' }, comment: { has: 'false', reason: 'You can't comment in this domain because you are not a member' }, proposeComment: { has: 'true', reason: '' } }, summaries: {}, creatorIds: [ 'NateSoares', 'EricRogstad' ], childIds: [], parentIds: [ 'logarithm' ], commentIds: [ '440', '441', '448', '449', '44c', '8np' ], questionIds: [], tagIds: [ 'b_class_meta_tag' ], relatedIds: [], markIds: [], explanations: [], learnMore: [], requirements: [], subjects: [], lenses: [], lensParentId: '', pathPages: [], learnMoreTaughtMap: {}, learnMoreCoveredMap: {}, learnMoreRequiredMap: {}, editHistory: {}, domainSubmissions: {}, answers: [], answerCount: '0', commentCount: '0', newCommentCount: '0', linkedMarkCount: '0', changeLogs: [ { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '19582', pageId: 'digit_exchange_rates', userId: 'AlexeiAndreev', edit: '0', type: 'newTag', createdAt: '2016-09-14 23:57:51', auxPageId: 'b_class_meta_tag', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '19584', pageId: 'digit_exchange_rates', userId: 'AlexeiAndreev', edit: '0', type: 'deleteTag', createdAt: '2016-09-14 23:57:51', auxPageId: 'work_in_progress_meta_tag', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '14557', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '18', type: 'newEdit', createdAt: '2016-06-24 05:02:48', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '13441', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '17', type: 'newEdit', createdAt: '2016-06-17 06:39:54', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12342', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '16', type: 'newEdit', createdAt: '2016-06-10 17:36:38', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12210', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '15', type: 'newEdit', createdAt: '2016-06-09 20:57:54', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12209', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '14', type: 'newEdit', createdAt: '2016-06-09 19:12:52', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12208', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '13', type: 'newEdit', createdAt: '2016-06-09 19:10:55', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12207', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '12', type: 'newEdit', createdAt: '2016-06-09 19:08:57', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12194', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '11', type: 'newEdit', createdAt: '2016-06-09 17:47:51', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12168', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '10', type: 'newEdit', createdAt: '2016-06-09 09:09:14', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12165', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '9', type: 'newEdit', createdAt: '2016-06-09 09:05:41', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12162', pageId: 'digit_exchange_rates', userId: 'EricRogstad', edit: '7', type: 'newEdit', createdAt: '2016-06-09 08:55:34', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12145', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '3', type: 'newEdit', createdAt: '2016-06-09 06:04:47', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12130', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '0', type: 'newAlias', createdAt: '2016-06-09 01:20:22', auxPageId: '', oldSettingsValue: '427', newSettingsValue: 'digit_exchange_rates' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12131', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '2', type: 'newEdit', createdAt: '2016-06-09 01:20:22', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12129', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '1', type: 'newEdit', createdAt: '2016-06-09 01:19:21', auxPageId: '', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12126', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '1', type: 'newTag', createdAt: '2016-06-09 01:19:14', auxPageId: 'work_in_progress_meta_tag', oldSettingsValue: '', newSettingsValue: '' }, { likeableId: '0', likeableType: 'changeLog', myLikeValue: '0', likeCount: '0', dislikeCount: '0', likeScore: '0', individualLikes: [], id: '12125', pageId: 'digit_exchange_rates', userId: 'NateSoares', edit: '1', type: 'newParent', createdAt: '2016-06-09 01:19:10', auxPageId: 'logarithm', oldSettingsValue: '', newSettingsValue: '' } ], feedSubmissions: [], searchStrings: {}, hasChildren: 'false', hasParents: 'true', redAliases: {}, improvementTagIds: [], nonMetaTagIds: [], todos: [], slowDownMap: 'null', speedUpMap: 'null', arcPageIds: 'null', contentRequests: { fewerWords: { likeableId: '3463', likeableType: 'contentRequest', myLikeValue: '0', likeCount: '1', dislikeCount: '0', likeScore: '1', individualLikes: [], id: '68', pageId: 'digit_exchange_rates', requestType: 'fewerWords', createdAt: '2016-08-27 22:59:06' }, moreTechnical: { likeableId: '3711', likeableType: 'contentRequest', myLikeValue: '0', likeCount: '1', dislikeCount: '0', likeScore: '1', individualLikes: [], id: '158', pageId: 'digit_exchange_rates', requestType: 'moreTechnical', createdAt: '2016-11-19 00:35:04' } } }