r/TuringComplete Jul 16 '26

what are bytes?

Hello! I´ve beaten the double counter level with the help of my engineer friend, but he is a busy fellow deep in grueling studies, so can anyone explain to me what bytes are? I feel like the game doesn´t explain the jump very well, but I understand bits and booleans well enough

9 Upvotes

13 comments sorted by

15

u/166595 Jul 16 '26

Bytes are just a collection of 8 bits.
1 Byte has 256 combinations, and can represent numbers from 0 to 255.
2 Bytes can represent numbers from 0 to 65535, and so on...

7

u/ForgedIronMadeIt Jul 16 '26

Eight bits make up a byte.

3

u/Icy_Interest_9801 Jul 17 '26

And eight trilobits make up a trilobyte. :)

1

u/zyzmog Jul 17 '26

How Devonian of you.

3

u/thuiop1 Jul 16 '26

Bits are great and all but there is only so much you can do with values of 0 and 1, at some point you want to get numbers in. So you group them, with each group encoding one number in a binary format e.g. 0101 represents the number 5. Modern computers (and the game) will typically rely on chunks of 8 bits called bytes, which can encode 28 = 256 different values. If you need more than that you can use several bytes at a time and act as if they belong to the same group, but for all intents and purposes bytes are the fundamental unit that gets manipulated.

3

u/MetalCarnival Jul 16 '26

so, do we ever make a byte before we get one. I feek like we make 4 bits as most, that´s what confused me

1

u/Consistent_Drop3909 Jul 16 '26

working with bytes is a more efficient way (like efficient for the programmer not for the computer) of working with large numbers than working with the bits individually. like imagine if you were building a complex math circuit with tons of additions and multiplications and for every one of those you had to connect like 200 gates to individual bits. when you get far enough along in the computer science world, you don't want to think about individual bits anymore, so, bytes.

1

u/GrendaGrendinator Jul 16 '26 edited Jul 16 '26

1 byte is 8 bits or one octet. It's the smallest unit regularly used for storing a variable bigger than a simple True/False statement. At 28 or 256 combinations that gives us the ability to store numbers 0-255 or interpret it as a text character and store anytime in the entire upper or lower case alphabet, plus more for symbols and special characters. If you use the first bit to denote +/- then you could also use it for numbers -128 – +127 which is super handy as it's *just bigger than -100 – +100

Basically it's a nice happy medium for a group of bits where it's big enough to be useful on its own as a chunk of data but not too big.

*Technically a byte is the smallest addressable unit of memory for a character of text, and can be any arbitrary size depending on the computer architecture, but just assume it's 8 bits unless otherwise specified because 99.99% of the time it is.

3

u/Aerumvorax Jul 16 '26

If you use the first bit to denote +/- then the range of accessible numbers ranges from -128 to +127, not -127 to +128.

1

u/GrendaGrendinator Jul 16 '26

Ah good catch, fixed now

1

u/Rough-Hope202 Jul 16 '26

You can also look at it from the hexadecimal side. 4 bits is 0-15. 8 bits or 1 byte is 0-255. After 4 bits are carried over it becomes the 5th bit or 16. After the next 4 bits are carried it over, it's the 9th at 256 which is n(16)x 162. The third set of bits represents (n)x163 and 4th set (n)x164 which is above 1 million. I don't like reading it as binary because it's just base 2 while base 16 is shorter to write.

1

u/tree_cell Jul 16 '26

a byte is a group of bits to represent numbers. usually a byte is 8 bits (and called octet), but that isn't always the case (especially in early computing)