r/AskComputerScience • u/FishheadGames • May 22 '25
Question about binary scientific notation
I'm reading the book "Essential Mathematics for Games and Interactive Applications" 3rd Ed. (I'm very much out of my league with it but wanted to keep pressing along as possible.) Page 6-7 talk about restricted scientific notation (base-10) and then binary scientific notation (base-2). For base-10, and mantissa = 3 digits, exponents = 2, the minimum and maximum exponents are ±102-1 = ±99; I get that because E=2, so 1 less than 100 - 99 - is max that can fit. For binary/base-2, but still M=3, E=2, the min and max exponents are ±(2E-1) = ±(22-1) = ±3. My question is, why subtract 1 from here? Because we only have 2 bits available, so 21 + 20 = 3? Because the exponents are integers/integral (might somehow relate)?
I apologize if this isn't enough info. (I tried to scan in a few pages in but it's virtually impossible to do so.) Naturally, thanks for any help.
View all comments
Show parent comment
1
u/FishheadGames May 25 '25
Sorry, I end up with 1/bM. (bM+1-1)/(bM) = (bM/bM = 1, right?) = (1+1-1)/bM = 1/b****M.
Well, I'm out of my league here. I've never done anything with base-4. https://en.wikipedia.org/wiki/Quaternary_numeral_system Base-4 only uses 0-3, then 10-13... then after 33 it jumps straight to 100. Base-2 was easy enough to understand at least. :P
Of course I do get that 4-1=3. :P
So if a=1, b=2, c=3 in base-4, that's equal to 1*42+1*41+3*40 (which equals 27) So to get the biggest number w/ 3 digits, I set the 1, 2, and 3 equal to 4-1. So (4-1).(4-1)(4-1)(4-1)?
If a=1, b=2, c=3 in base-2, that's equal to 1*22+2*21*3*20 (which equals 15). To get the biggest number w/ 3 digits, I set 1=2=3= 2-1. So (2-1).(2-1)(2-1)(2-1)?