Can anyone tellme what is bits and bytes and why storage is different for integer and other classes | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone tellme what is bits and bytes and why storage is different for integer and other classes

storage classes

20th Oct 2018, 10:36 AM
Sushmanth
Sushmanth - avatar
2 Answers
0
Hello. Bits are the smallest unit to representate information. A Bit have only two values 'true' / 'false' or 1/0. One Byte = eight Bits. An integer normally have the size of 32 Bit or 4 Bytes. The size can be different. The different sizes are useful because every variable needs memory.
20th Oct 2018, 11:24 AM
Timo Heinzelmann
Timo Heinzelmann - avatar
0
tnk u timo
20th Oct 2018, 11:26 AM
Sushmanth
Sushmanth - avatar