#what does the |= operator mean?

1 messages Β· Page 1 of 1 (latest)

rain whale
#

like srsly, i cannot find any info on the internet.

unique dockBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question πŸ€–. Maybe it helps! In any case, a human is on the way πŸ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

sly pike
#

means OR

unique dockBOT
#
TJ-Bot
Like srsly, i cannot find any info on the internet.

The |= operator in Java is a bitwise OR assignment operator. It performs a bitwise OR operation between two operands and assigns the result to the left operand.

Here's an example:

int a = 5; // binary: 0101
int b = 3; // binary: 0011

a |= b; // equivalent to a = a | b, result: 7 (binary: 0111)

This operator can be useful for setting specific bits in an integer variable without affecting the other bits.

Useful links:

sly pike
#

yeah

#

there is your answer

#

but

#

there is some exceptions

cobalt ore
sly pike
#

you cannot do |= for float double String & Object

#

only the integrals is allowed

cobalt ore
sly pike
#

enum, short, byte, char, int, long

cobalt ore
cobalt ore
sly pike
rain whale
#

wait so it adds the binaries of 3 to 5?

#

to make 7 bins?

sly pike
sly pike
rain whale
#

ooooooooh

#

like

#

5 or 3?

sly pike
#

so 3 is 0011

cobalt ore
sly pike
#

5 is 0101

cobalt ore
sly pike
#

0011 | 0101 becomes 0111

rain whale
#

oh

sly pike
#

which is 7

rain whale
#

so it fills the bit gaps?

#

crazy

cobalt ore
sly pike
cobalt ore
#

| means or

sly pike
#

basically

#

when you are OR-ing in binary

nimble flame
#

bitwise OR rather than logical OR

sly pike
sly pike
rain whale
#

oh boy i am getting confused.
damn in college they dont teach us crap

sly pike
#

therefore becomes 0111 (7)

rain whale
#

oh

sly pike
#

because it doesn't make sense

rain whale
#

wait 0111 is 7 in binary?

sly pike
#

yes

rain whale
#

trying to understand, my monkey brain is not used to this lol

sly pike
#

because

2^3 2^2 2^1 2^0
0   1   1   1
#

2^0 is 1
2^1 = 2
2^2 = 4

#

so 1 + 2 is 3

#
  • 4 = 7
rain whale
#

OH WAIT

#

I REMEMBER

#

THAT IS UUHHH

#

BIT COUNTING

#

i saw that 3 years ago in highschool

#

never had to actually use it

sly pike
#

1 and 0

#

so for every bit

rain whale
#

there's 2 bytes

sly pike
#

Each position is a power of 2

rain whale
#

2^8 = 16 bits

#

ooooooooh

#

omg i am getting the hold of it now

sly pike
#

8 bits = 1 byte

rain whale
#

so this is 2 bytes

sly pike
#

2^8 = 256

#

oh nvm

#

didn't read the statement carefully

#

but yes

cobalt ore
sly pike
#

its 2 bytes

cobalt ore
sly pike
#

since 8 bits is 1 byte

rain whale
#

wait

#

so NES games are heavier than their processor's power?

sly pike
#

that is outside topic of this question

#

but yes

rain whale
#

all of this info is really usefull thanks stack, you are a real one

#

and alathreon too

rain whale
sly pike
cobalt ore
#

@rain whale
| means OR

| 1 0
1 1 1
0 1 0

& means AND

& 1 0
1 1 0
0 0 0

^ means XOR

| 1 0
1 0 1
0 1 0

~ means NOT
1 -> 0, 0 -> 1

sly pike
#

has 2 bits

#

decimal has 10

#

hex has 16

cobalt ore
sly pike
#

and octal

#

8

rain whale
#

ooooh ok ok

sly pike
#

Binary is base 2
Octal is base 8
Decimal is base 10
hex is base 16

cobalt ore
#

hexadecimal it's called

sly pike
#

ye

rain whale
#

it goes down

#

so does that mean you start with the bigger number 'til 0?

#

on the times(n) i mean

sly pike
#

you start from right

#

which is power of 0

#

as soon you progress to left

#

you power based on how much position you moved to left

rain whale
#

oooooooooooooooh

#

ok ok

#

so if it is 1 its gonna be 1*10⁰

cobalt ore
# rain whale it goes down

Decimal:
10^0 = 1
10^1 = 10
10^2 = 10.
10^3 = 1000
etc

Binary:
2^0 = 1
2^1 = 10
2^2 = 100
2^3 = 1000
etc

Same for all bases

sly pike
#

so 1 * 1 is 1

#

yes

cobalt ore
#

ah oops

#

sorry fixed

#

@rain whale

sly pike
#

decimal is 0 to 9

#

binary is 0 to 1

#

octal is 0 to 7

#

and hexadecimal is 0 to F

rain whale
#

oh my god, with this new found knowledge i can make encrypted messages

#

or at least a better password

stuck sandal
#

πŸ™‚

#

its always nice when things start to make sense

rain whale
#

it is!

#

never knew how hexadecimal worked

#

people never teached it in college or highschool so

#

i am only a first year student after all

cobalt ore
#

Btw

#

try to add 2 binary numbers or 2 hex numbers

stuck sandal
#

yeah, it really helps to understand that all number systems, including decimal, work the same way

#

as in sum of digit * base^index

cobalt ore
#
 01101001
+00110111
---------

Try to do it

#

@rain whale

stuck sandal
#

its all just working the same way

#

the same system that u used to add decimals can be used to add numbers in any other base

cobalt ore
#

btw seconds and minutes are technically base 60, assuming each number is a digit, so you apply the same rules but in base 60
hours is base 24
so by just applying this knowoledge, you know how to do math with time

rain whale
#

what a beautiful community

#

3*60ΒΉ should be for uhhh 3 min?

cobalt ore
#

yes

rain whale
#

because 60Β² would be 60 minutes which is one hour

#

since 60 seconds times 60 seconds?

#

oh wait

#

i think i am wrong

#

60 * 60 would be over than 1 hour

#

oh no i wasn't

#

i just phrased it like ass

#

60Β² is one hour

#

60 minutes

#

which is 3600 seconds

cobalt ore
rain whale
#

i'll try it rn!

rain whale
stuck sandal
#

its binary

#

not octal

rain whale
#

sorry mixed terms

stuck sandal
#

they just want to show u that manual addition in binary works the same way as u learned in school for decimals

#

so u do it right to left and have the "carry" when u go beyond max digit

#

so 1+1 is 10. meaning u write down 0 and carry a 1 over for the next digit to add

#

and so on

bright lagoon
#

(every number system is a base 10 system)

rain whale
#

so it's 20?

bright lagoon
#

Base ten system

0
1
2
3
4
5
6
7
8
9
10 *
11
12
13
14
15
16
17
18
19
20 *
#

Base eight system

0
1
2
3
4
5
6
7
10 *
11
12
13
14
15
16
17
20 *
21
22
23
24
#

Base four system

#
0
1
2
3
10 *
11
12
13
20 *
21
22
23
30 *
31
32
33
100 *
101
102
103
110 *
#

Base two system

#
0
1
10
11
101
110
101
110
111
1000
1001
1010
1011
1100
1101
1110
1111
10000
10001
10010
stuck sandal
#

it just defines how many different symbols u have available per digit

#

what the number means is always given the same way though

#

sum of digit * base^index

stuck sandal
#

digit by digit from right to left

rain whale
#

oooooooooooh

stuck sandal
#

like, imagine adding two decimal numbers manually:

#
  123
+ 862
-----
#

from right to left u add 3+2

#

5

rain whale
#

5

#

8

#

9

stuck sandal
#

then 2+6 = 8
then 8+1 = 9

#

yeah

rain whale
#

985

stuck sandal
#

and next difficulty level is when u go beyond max digit

#
  867
+ 693
-----
rain whale
#

0 and 1 goes to the left

stuck sandal
#

as u now need to add whats called a carry digit

rain whale
#

15 + 1, 6 stays and 1 goes left

#

1510

stuck sandal
#

yeah. and the exact same system can be applied to do addition in binary or any other system

#

when u have 1+1 in binary u end up at 10

#

so thats a 0 and a 1 carries over

rain whale
#

oh

#

so wait

#

OHHH

stuck sandal
#

bc 1+1 would be 2 but that symbol doesnt exist in binary. so u need to advance to the next digit

#

similar to how after 9 u get 10 in decimal

#

bc 9 is the last symbol

rain whale
stuck sandal
#

in a base-4 system u would count 0, 1, 2, 3 and then advance the digit to 10, 11, 12, 13, 20, 21,...

#

and so on

#

its essentially all the exact same mechanics. always working the same way

rain whale
#

so it always was 10000000

#

huh

stuck sandal
#

for systems beyond decimal we kinda have to invent new symbols to count past 9 in a digit

#

and people came up with using the alphabet for that

rain whale
#

hexadecimal messages

#

damn

stuck sandal
#

so in a hexadecimal (base-16) system we for example count 0-9 and then A-F

#

and then advance the digit

cobalt ore
stuck sandal
#

but in theory u could use any symbol u want, as long as everyone understands it

sly pike
stuck sandal
#

the ancient mayas for example used a base-20 number system

cobalt ore
#
 11111111
 01101001
+00110111
---------
 10100000

@rain whale

stuck sandal
sly pike
rain whale
#

i feel illiterate

sly pike
sly pike
#

for the 11111111 btw (-1)

rain whale
#

what is 1+1+1?

stuck sandal
#

11

rain whale
#

is it 100?

sly pike
rain whale
sly pike
#

for the other digit

stuck sandal
#

u need to think about it as if its decimal, bc it works the same way

#

u count up a digit until u reach the max symbol

#

and then advance

#

rethink decimals

#

0, 1, 2,..., 9, 10, 11,...

rain whale
#

ok so once it reaches decimal the extra 1 just stays got it

languid wadi
#

Before we dive into our lessons, lets get introduced to the Abacus terminology. If you do not already have an Abacus, click here to see some Abacus we recommend
https://learnabacusathome.com/resources

For worksheets to go along with this lesson, try a 7 day FREE trial at
https://members.learnabacusathome.com/membership-options

For comprehens...

β–Ά Play video
languid wadi
#

learn the abacus

#

bits are the same

stuck sandal
#

binary: 0, 1, 10, 11, 100, 101, 110, 111,...

#

as soon as u would get the symbol 2 in decimal, that doesnt exist anymore and u need to advance a digit

cobalt ore
stuck sandal
#

just practice a bit and it will click and feel super natural

cobalt ore
#
 52A6F
+DE693
------

Try this now @rain whale

rain whale
#

ok so, if 10 is A that means F is 15

#

so it would be something like

#

5211615
+1314693

stuck sandal
#

try to not go decimal

#

do it digit by digit from right to left

#

in hex

#

stay in the base to understand how it works

stuck sandal
#

F+3. start with that. thats 3 symbols above the maximum available symbol in hex

sly pike
#

its simple itself

stuck sandal
#

so u need to advance a digit

sly pike
#

i just add hex

stuck sandal
#

F+1 gives u 10

sly pike
#

no need to turn it to decimal

stuck sandal
#

then u still need to add 2

#

12

sly pike
#

as casting is extra step

rain whale
#

197768

stuck sandal
#

so u get the digit 2 and the 1 carries over

sly pike
sly pike
stuck sandal
#
  52A6F
+ DE693
     1
-------
      2
sly pike
#

think of adding decimal

#

but only for hex

stuck sandal
#

cmon, lets do it together

#

i did the first digit

sly pike
#

so lets say

#

9 + 2

#

its 11 obvious

#

but

#
12
19 +
#

2 + 9 is 11

#

but you can't just add 11 as final result

#

so what you do

rain whale
sly pike
#

so 1 + 1 is 2

#
  • the carry
#

3

#

31

stuck sandal
#

but u should stay in the base at hand and not switch to decimal to actually understand it

sly pike
#

do the same step for hex

stuck sandal
#
  52A6F
+ DE693
     1
-------
      2
#

this is the first digit done

#

next step now

#

6+9+1

sly pike
#
     1
  52A6F
+ DE693
-------
      2
rain whale
#

1 carried over and 6 down?

sly pike
#

its just clearer for me

stuck sandal
sly pike
stuck sandal
#

can u tell us what ur doing instead of just throwing out a result

sly pike
#

for decimal you should remember
you cannot go over nor below 0-9

#

same with hex

#

0-F

stuck sandal
#

i also feel like ur not reading everything people write, so maybe its just too much at once?

sly pike
stuck sandal
sly pike
rain whale
maiden sequoia
sly pike
#

but you can't add 2 digit at once

#

so you put 2

#

and 1 is a carry

#
     1
  52A6F
+ DE693
-------
      2
#

now

#

what is 6 + 9

#

(never treat it as decimal ever)

stuck sandal
#

it might help to add it in single steps. like 6 + 9 is the same as 6 + 1 + 1 + 1 + 1 +... (9 times)

rain whale
#

2

#

and 1 as a carry

stuck sandal
#

why do u think that?

rain whale
#

oh wait i am stupid

#

fudge

sly pike
#

its really easy

rain whale
sly pike
#

wat

stuck sandal
#

step by step

sly pike
#

you know what i'll spoonfeed for once

stuck sandal
#

6 + 1 is 7

#
  • 1 is 8
#
  • 1 is 9
#
  • 1 is...?
rain whale
#

oh wait now i get it

#

A

stuck sandal
#

yes

#

then B

sly pike
#

next?

stuck sandal
#

then C

sly pike
#

Then D

#

and finally

#

F

rain whale
#

wait so its F

sly pike
#

yes but you are not done

#

add the carry then

rain whale
#

G

sly pike
#

no

stuck sandal
#

that doesnt exist

sly pike
stuck sandal
#

hex uses the symbols 0-9A-F

#

then its out of symbols

sly pike
#

its 10

#

but again

#

double digit

stuck sandal
#

what do we do in a number system when we are out of symbols?

sly pike
#

so we put 0

#

and 1 is a carry

stuck sandal
#

we advance the digit

sly pike
#
    1 
  52A6F
+ DE693
-------
     02
rain whale
#

so everything over 9 is gonna be 10 if its out of symbols?

#

well not ten

#

0 and 1 carried?

stuck sandal
#

no

sly pike
#

@rain whale what would happen if you add 1+9

sly pike
#

(in decimal))

stuck sandal
#

everything beyond the last available symbol will cause a new digit to be added

sly pike
#

but what if it was in decimal

#

1+9

rain whale
#

10

sly pike
#

see

stuck sandal
#

bc 9 is the last symbol in decimal

#

that's why we go to 10

sly pike
#

you advance to the next digit

#

same thing you go with hex

stuck sandal
#

just that in hex we have more symbols per digit

#

after F comes 10

#

then 11 then 12... 19, 1A, 1B,...1F

rain whale
#

then 1A

stuck sandal
#

and then out of symbols again

sly pike
#

i would say 0x10

rain whale
#

ok i think i finally get it

stuck sandal
#

20, 21

sly pike
#

so i can its hex

stuck sandal
#

until 2F

#

then out of symbols again

#

30

rain whale
#

which is 30

stuck sandal
#

yes

rain whale
#

and then so on

stuck sandal
#

eventually u reach FF

#

then u need a new digit, 100

sly pike
#

okay

#

whats A + 6

rain whale
sly pike
#

okay

#

now add the carry

sly pike
#

wait

#

that is wrong

#

calculate it again

rain whale
#

oh wait it is 10

#

my b

sly pike
#

now its correct

#

now add the carry

#
    1 
  52A6F
+ DE693
-------
     02
rain whale
#

wait so now it's 11 again

sly pike
#

yep

#

but now

#

should we put 2 digit down at once

#

what should we do next?

rain whale
#

carry 1 to the left

#

and leave the 1 be

sly pike
#

gg

rain whale
#

11 again the next one btw

sly pike
#
   1  
  52A6F
+ DE693
-------
    102
#

okay

#

what about the carry

rain whale
#

it has the carry, cuz after F comes 10

sly pike
#

ah you calculated the carry

#

okay

#
  1  
  52A6F
+ DE693
-------
   1102
rain whale
#

5 + D should be 14 counting the carry

sly pike
#

uhhh

#

no

#

count again

rain whale
#

13

#

my bad

sly pike
#

gg

rain whale
#

again

sly pike
#

but now

#

should we now put all down

#

or what

rain whale
#

it stays, no more carry

sly pike
#
  52A6F
+ DE693
-------
 131102
#

thats right

stuck sandal
#

and what is 131102 in decimal now?

  1 * 16^5
+ 3 * 16^4
+ 1 * 16^3
+ 1 * 16^2
+ 0 * 16^1
+ 2 * 16^0
#

and thats how it all works πŸ™‚

#

with that knowledge u could now also work with maya numbers

#

this is for example

  7 * 20^2
+ 8 * 20^1
+ 9 * 20^0
#

which would be how the mayas wrote the number we know as 2969

stuck sandal
#

no

#

i gave u the solution already

#

oh wait

#

u added it up

#

dunno, i didnt put it into a calc

#

but i doubt

#

it must be much higher

#

16^5 is already over a million

rain whale
#

somehow python gave that

stuck sandal
#

bc ^ in code isnt power

#

but xor

#

😬

rain whale
#

oh dang

stuck sandal
#

but yeah, it must be a high number

#

somewhere around a million

rain whale
#

it is, it's 1.048.576 mill

stuck sandal
#

yeah but u need to add it all up

#
  1 * 16^5
+ 3 * 16^4
+ 1 * 16^3
+ 1 * 16^2
+ 0 * 16^1
+ 2 * 16^0
rain whale
#

got it

#

1249538

stuck sandal
#

1048576

  • 196608
  • 4096
  • 256
  • 0
  • 2
rain whale
#

i got bamboozled by google calculator

stuck sandal
#

right. so that's how it all works. now u can in theory do everything u want with any number system u want

#

bc u understand the actual mechanics behind it

#

πŸ‘

rain whale
#

ok so let me get this straight, so i turned hex into decimal?

stuck sandal
#

and u added two hex numbers in hex

#

and also two binary numbers

rain whale
#

my monkey brain is confused of what i've just done but i think i start to get it

stuck sandal
#

the last thing we did?

rain whale
stuck sandal
#

with the 1 million?

#

so what we did here is to learn how to turn anything into decimal

#

for that, let's quickly look at decimal itself

#

lets say the number 372. how does it work, how do these 3 digits form the number three-hundred-seventy-two?

#

each digit contributes a certain value to the final number

#

from right to left, we start with digit 2

#

digit 2 contributes to the final value 2 * 10^0

#

(thats just 2)

#

then the digit 7

#

it contributes to the final value 7 * 10^1

#

surprise surprise, that's 70

#

finally the digit 3

#

it contributes to the final value 3 * 10^2

#

thats 300

#

so the final value is 300+70+2

rain whale
#

if people knew we inject this to a rock mashed to dust and turned into glass with magic runes they wouldn't believe it

stuck sandal
#

so we always take the digit and multiple it with the base to the power of the index

#

and then sum that up

#

for decimals this exercises sounds pointless but we can transfer it to any other base

rain whale
#

ok so in simple monke term words, we took what we resolved and then we dissect it like a bug to get what makes the number, the number itself

stuck sandal
#

so if we for example look at the nunber 521 in a base-7 system, then that number means in decimal the following:

#

from right to left

#

the digit 1 contributes 1 * 7^0

#

the digit 2 contributes 2 * 7^1

#

the digit 5 contributes 5 * 7^2

rain whale
#

1 * 7 ^0
2 * 7^1
5 * 7^2

#

damn

stuck sandal
#

yes

rain whale
#

wait a second

#

so to turn A word into binary

stuck sandal
#

thats 1+14+245=260

#

so 521 in base-7 is 260 in base-10 (decimal)

rain whale
#

A = 10 right?

#

i mean its not ten itself

#

but after 9 we run out of digits

#

until the next batch

#

so how can i turn a word into a binary?

stuck sandal
#

which system are u in now?

rain whale
#

a base 2 system

stuck sandal
#

which number from which system into what system?

rain whale
#

from hex to base 2 system

stuck sandal
#

so for example the hex number E6 to binary?

rain whale
#

yeah

stuck sandal
#

for that u go to decimal first and then we learn how to turn decimal into another system

#

so E6 in decimal is what?

#

we just learned how it works

#

digit 6 contributes...
digit E contributes...

#

sum up

#

done

rain whale
#

6 * 16^0
14 * 16^1?

stuck sandal
#

yes. but E has what "worth" in decimal?

rain whale
#

14

stuck sandal
#

yup

#

oh, u used the wrong base

#

its not 10

#

its 16

rain whale
#

oh

stuck sandal
#

each digit in a base-16 system have the worth of powers of 16

#

so yeah. i think its 230 in decimal?

rain whale
#

yup

stuck sandal
#

now u need to learn how to go from decimal to another number system

rain whale
#

it is 230

#

decimal?

#

wait no

#

i am stoopid

stuck sandal
#

and for that u need to repeatedly divide by bases of the target number system

#

so E6 from hex is 230 in decimal. and now we want the binary of that

rain whale
#

0 is gonna be 0

#

like aint movin

stuck sandal
#

no wait

#

we havent learned that direction yet

#

from decimal to another system works by dividing powers

#

u want 230 in binary. binary is base-2. so we need powers of 2

#

u need to find the highest power of 2 that u can divide 230 with

#

lets try out some

rain whale
#

10

stuck sandal
#

maybe 2^10

#

that is 1024

#

too high

#

doesnt fit into 230

rain whale
#

4?

#

6

stuck sandal
#

2^6 u mean?

rain whale
#

yeah

#

8 would be 256

stuck sandal
#

we can go higher

#

than 6

#

yes, 8 is too high

rain whale
#

7

#

7 works

stuck sandal
#

yes. 2^7 = 128. that is the highest power of 2 that still fits into 230

#

how often does it fit inside 230? (division with remainder)

rain whale
#

the admin is teaching me wizardry, if i tell this to my gf she aint believing it lol

stuck sandal
#

it fits in it once. remainder would be 102 (230- 1*128)

#

so. we now found out that the 7th digit must be 1

#

so our work in progress binary number is

#

1000000

#

or actually, the 8th digit bc 2^7 is the 8th digit, given that the first digit is 2^0

#

so our wip result is
1000 0000

#

(adding the space for readability)

#

anyways. from our number 230 we covered 128 now

#

we have 102 left to cover

#

same procedure again. find the highest power of 2 that fits into it

rain whale
#

6

stuck sandal
#

yes. 64 fits into it once, remainder is 38

rain whale
#

5

#

and then the remainder is 6

stuck sandal
#

so we found out that the digit responsible for 2^6 is 1 bc it fits into it once

#

our wip result is

#

1100 0000

#

and yes, 2^5 is next

#

fits into it once again. so wip result is

#

1110 0000

#

remainder is indeed 6

rain whale
#

1111 100

stuck sandal
#

whats her highest power of 2 that fits into 6

rain whale
#

3 is 8

#

its too big

stuck sandal
#

yes so we now need to set the digit responsible for 2^2

rain whale
#

and then, the highest power is gonna be 1

#

since we are left with 2

#

and after that, 1111 100

stuck sandal
#

wip result: 1110 0100

rain whale
#

huh

stuck sandal
#

u need to set the digits that correspond to the power u picked

rain whale
#

oh wait i get it now

#

yeah

#

yeah

stuck sandal
#

so remainder now is 2. highest base that fits is 2^1

#

fits once

#

remainder 0

#

so we are done after this step and get:

rain whale
#

1110 0110

stuck sandal
#

exactly

#

πŸ™‚

rain whale
#

the last 0 is 0 so we didn't took it

stuck sandal
#

yes

#

and the same system also works for any other base

rain whale
#

ok so we move from hex -> decimal -> binary

stuck sandal
#

if u go base-17 instead of base-2 u divide by powers of 17

#

and check how often they fit

rain whale
#

and same with binary to get into a bigger number

#

since decimals are technically bytes of data

stuck sandal
#

yeah. its always the same mechanics

rain whale
#

not bits

#

wait

#

what about if i want to go further than F

#

like writting H in bin

stuck sandal
#

then add more alphabet to it

#

if u want a base 17 system then count to G

#

if u need a base 20 system then count to J

rain whale
#

ooooooooooooooooooooooooooh

stuck sandal
#

or invent totally new symbols, who cares as long as everyone understands what each symbols worth is

#

the mayas drew lines and points

#

instead of using numbers and alphabets

rain whale
#

ok ok, so basically, the more words i use the bigger the base is

#

then that base is turned into decimal

#

and then that is turned into binaries

stuck sandal
#

yes. the mayas had a base-20 system with 20 unique symbols for their digits

#

which we would typically represent with 0-9A-J

rain whale
#

dude i am learning more on discord than in college

#

this is crazy

#

our teacher didn't teached us what even operators are

stuck sandal
#

that's how the mayas wrote down their digits

#

so if they wrote sth like

rain whale
stuck sandal
#

yeah. but its base 20

rain whale
#

huh

stuck sandal
#

so in decimal thats 2969

#

that's how the mayas wrote down what we know as 2969

#

they count from 0 to 19 on a single digit

#

using these unique symbols

#

and then they advance to the next digit

#

where they again have 20 symbols to put

#

its base-20

#

similar to how we count in hex from 0 to F

rain whale
#

huh

#

now that i realize

#

it just looks like a ram localization graph

#

for every bit and byte, it's getting taller

stuck sandal
#

^^ ultimately u can pick whichever symbol u want as long as everyone gets what they mean

#

for example, let's say u invent a number system that uses 3 symbols per digit

#

first symbol is 🐢

#

second symbol 🐱

#

third symbol 🐭

#

then u could write down a number like 🐢🐭🐭🐱 for example

#

to get that into decimal u just need to know the base (base-3 bc it uses 3 symbols per digit) and the worth of each symbol (dog is first symbol, worth 0. cat is second symbol, worth 1, mouse is third symbol, worth 2)

#

then it translates to

  1 * 3^0
+ 2 * 3^1
+ 2 * 3^2
+ 0 * 3^3
#

27 in decimal

#

and counting in that system is
🐢, 🐱, 🐭
🐱🐢, 🐱🐱, 🐱🐭,
🐭🐢, 🐭🐱, 🐭🐭,
🐱🐢🐢, 🐱🐢🐱,...

rain whale
#

oooh

#

btw thinking about getting an abacus

#

just to be more organized

#

never actually used one properly before i think