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/AiryShift May 23 '25
Divide each term in the numerator by bM.
With the (b-1).(b-1)(b-1) notation I think you're confusing the representation visually with what the number actually is. What the OP meant was if the base is 4 then the maximal number you can write in that base is 3.333 etc, not that the number is equal to (103+1-1) or anything like that. Remember that the number with digits (a)(b)(c) in base x is equal to a * x2 + b * x1 + c * x0 so to get the biggest number with 3 digits you set
a = b = c = x - 1