r/computerscience • • Nov 05 '24

Why binary?

Why not ternary, quaternary, etc up to hexadecimal? Is it just because when changing a digit you don't need to specify what digit to change to since there are only two?

16 Upvotes

98 comments sorted by

View all comments

Show parent comment

6

u/OddInstitute Nov 05 '24

Binary-coded decimal was also a popular encoding scheme historically. While it is still binary, it’s pretty different from our most popular current approaches.

1

u/JL2210 Nov 06 '24

division isn't expensive anymore and representing numbers as strings of characters is also an option because memory size is so huge

1

u/sleepy_spermwhale Nov 06 '24

Doing math with strings of characters is not fast.