**New course!**Every coder should learn

**Generative AI!**

0

# Integer storage space

How is the integer 32767 stored in binary in two bytes and should it be converted to ascii ??

11 Answers

+ 2

111111111111111
That’s 15 bits. The sixteenth bit is reserved for signed as positive or negative number.

+ 1

Integers are stored as numbers, typically using two bytes of memory for a small int. When converted to ascii, it uses one byte for each digit, in some cases two bytes per digit. So storing an integer as an ascii string is only useful when you need it as a string. Plus, as a string, it cannot be used for math without converting it back to an integer.

0

So please write me the binary code of this number

0

Thanks, can i have your email??

0

No. You can message me here

0

ok , whenever I have a question, I write here!!

0

Hi, can you explain the base32 code for me ??

0

Base numbering systems have a specific number of numbers per column. It’s a little crazy to get your head around at first.
Base 2 means only two valid digits. 0 and 1. In order to wrote the number with a value of three, you’ll need two columns. 11 is value 3.
Counting like this:
00 = 0
01 = 1
10 = 2
11 = 3
People use base 10. That means ten possible digits. 0123456789
To count above 9, you need two columns.
Base 16 uses 16 possible digits.
0123456789ABCDEF
Same rules , to count above 15, you need two columns.
0E = 14
0F = 15
10 = 16
11 = 17
It’s hard at first to get the feel for this. There’s a reason for these counting systems.
Base 32 works the same way. You can count up to 31 using a single column, then to write 32, you need two columns. I don’t know for site what the numbering system is for base 32. I would imagine 0-9 then A-W or whatever letter. I’m not that familiar with base 32.
In computers, we use binary, which is base 2. Octal, which is based 8, and hex, is base 16.

0

thank you

0

Mamad Did my lengthy explanation make it clear for you ? Did you need anything clarified?

0

Your explanation was very helpful, thank you