BigBit Standard

To represent the biggest number in the universe without precision loss

Created By Amitย Gupta

Let me ask you

What data type will you choose to assign and process 100,000 digits of pi?

Ummmโ€ฆ float, decimal,โ€ฆ BigNumberย โ€ฆ not sure!!

What output do you expect when you subtract 0.1 from 0.3?

0.2 but Iโ€™m not sure why it is 0.19999999999999998.

> var x = 0.3 - 0.1
undefined
> x
0.19999999999999998
What encoding will you use to represent/store the string of Emoji?

๐Ÿ˜€ ๐Ÿ˜ ๐Ÿ˜‚ ๐Ÿคฃ ๐Ÿ˜ƒ ๐Ÿ˜„ ๐Ÿ˜… ๐Ÿ˜† ๐Ÿ˜‰ ๐Ÿ˜Š ๐Ÿ˜‹ ๐Ÿ˜Ž ๐Ÿ˜ ๐Ÿ˜˜ ๐Ÿ˜— ๐Ÿ˜™ ๐Ÿ˜š โ˜บ๏ธ ๐Ÿ™‚ ๐Ÿค— ๐Ÿคฉ ๐Ÿค” ๐Ÿคจ ๐Ÿ˜ ๐Ÿ˜‘ ๐Ÿ˜ถ ๐Ÿ™„ ๐Ÿ˜ ๐Ÿ˜ฃ ๐Ÿ˜ฅ ๐Ÿ˜ฎ ๐Ÿค ๐Ÿ˜ฏ ๐Ÿ˜ช ๐Ÿ˜ซ ๐Ÿ˜ด ๐Ÿ˜Œ ๐Ÿ˜› ๐Ÿ˜œ ๐Ÿ˜ ๐Ÿคค ๐Ÿ˜’ ๐Ÿ˜“ ๐Ÿ˜” ๐Ÿ˜• ๐Ÿ™ƒ ๐Ÿค‘ ๐Ÿ˜ฒ โ˜น๏ธ ๐Ÿ™ ๐Ÿ˜– ๐Ÿ˜ž ๐Ÿ˜Ÿ ๐Ÿ˜ค ๐Ÿ˜ข ๐Ÿ˜ญ ๐Ÿ˜ฆ ๐Ÿ˜ง ๐Ÿ˜จ ๐Ÿ˜ฉ ๐Ÿคฏ ๐Ÿ˜ฌ ๐Ÿ˜ฐ ๐Ÿ˜ฑ

How will you decide whether you should use float or decimal data type?

9007199254740992 doesnโ€™t seem very bigโ€ฆ wait!! it doesnโ€™t have decimal point. Shouldnโ€™t I use long data type?

What data type or character encoding will you choose if youโ€™re very concerned about the storage?

Ummmโ€ฆ UTF-32โ€ฆ no wait!! it depends.

Probably the next session can help you to answer better.


BigBit standard treats 1 byte as a bit. So you can call it ByteBit format too. BigBit standard defines 3 numeric data type and 1 character encoding.

Numeric Dataย type

BigBit standard defines 3 numeric data types: LB, HB, EHB

  1. Linked Bytes Format: It can represent any positive non fractional number in the universe

2. Header Byte Format: It can represent any number between -13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095 and `13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095.

3. Extended Header Byte Format: It can represent any number in the universe.

Advantages

  • You can store any number in the universe.
  • Any number stored can be retrieved without precision loss. Check for 9007199254740992.
  • Theyโ€™re comparitvely smaller in memory than a number represented by IEEE 754 format. Check for 128.

Character Encoding

BigBit standard use LB format, given above, for character encoding. There is a single encoding for all the unicodes.

Advantages

  • It takes same space like UTF-8 for all ASCII characters between 0โ€“127. Check for a.
  • It takes small space than any UTF encoding for any other character or unicodes. Check for ๐Ÿ’ฉ๐Ÿ˜ƒ๐Ÿ˜ญ

Useful links

If you have any question or feedback regarding BigBit standard please comment.

Feedback

Feedbacks are important to understand how can I improve and bring more useful materials. Please clap this article, comment here, share with your friends, or please give a star to above mentioned github repositories.