We all use technology on a regular basis and we know that our electronic computing technology is based on bytes. But what exactly is a ‘Byte’ and why does it matter so much?
- Firefox® is a registered trademark of the Mozilla Foundation – www.mozilla.org/en-US/foundation/trademarks/policy/.
- Ubuntu® is a registered trademark of Canonical Ltd – ubuntu.com/legal/intellectual-property-policy.
- Moodle™ is a registered trademark of ‘Martin Dougiamas’ – moodle.com/trademarks.
I am independent from the organisations listed above and am in no way writing for or endorsed by them.
- Base-2 / Binary – en.wikipedia.org/wiki/Binary_number.
- Base-10 / Decimal – en.wikipedia.org/wiki/Decimal.
- Base-16 / Hexadecimal – en.wikipedia.org/wiki/Hexadecimal.
- Bit – en.wikipedia.org/wiki/Bit.
- Computer data storage – en.wikipedia.org/wiki/Computer_data_storage.
- CPU – en.wikipedia.org/wiki/Central_processing_unit.
- Data – en.wikipedia.org/wiki/Data.
- Flip-flop – en.wikipedia.org/wiki/Flip-flop_%28electronics%29.
- Hard disk drive – en.wikipedia.org/wiki/Hard_disk_drive.
- HTTP – en.wikipedia.org/wiki/Hypertext_Transfer_Protocol.
- HTTPS – en.wikipedia.org/wiki/HTTPS.
- Information – en.wikipedia.org/wiki/Information.
- Internet Protocol version 4 – en.wikipedia.org/wiki/IPv4.
- Memory – en.wikipedia.org/wiki/Semiconductor_memory.
- Network interface – en.wikipedia.org/wiki/Network_interface.
- Nibble – en.wikipedia.org/wiki/Nibble.
- Packet sniffer / analyser – en.wikipedia.org/wiki/Packet_analyzer.
- Register – en.wikipedia.org/wiki/Processor_register.
- TCP – en.wikipedia.org/wiki/Transmission_Control_Protocol.
- Transistor – en.wikipedia.org/wiki/Transistor.
- Valve / Vacuum Tube – en.wikipedia.org/wiki/Vacuum_tube.
- Web server – en.wikipedia.org/wiki/Web_server.
- Wireshark – www.wireshark.org and en.wikipedia.org/wiki/Wireshark.
The information presented in this article is written according to my own understanding, there could be technical inaccuracies, so please do undertake your own research.
Because computers are electronic circuits, they are built using ‘transistors’, if you combine two transistors together in a circuit then you can create a ‘Flip-flop’ which can retain / store one of two states (Flip-flops can also be created from ‘Valves’ / ‘Vacuum Tubes’). Thus you can have a ‘bit’ where the state of the ‘flip-flop’ can be ‘on’ or ‘off’, thus ‘0’ or ‘1’. As we have only two states then we are operating in ‘Base-2’ or ‘Binary’ instead of ‘Base-10’ or ‘Decimal’ where there are ten states, being 0 to 9.
If we combine several bits together, say four, then we get a ‘Nibble’ and can represent a number between 0 and 15, i.e. 8 + 4 + 2 + 1 = 15. Combine two ‘Nibbles’ together and we get a ‘Byte’ containing eight ‘bits’ and able to represent a number between 0 and 255, i.e. 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. Where the added up numbers represent the positional value of a bit, just like in decimal where we have the ones, tens, hundreds… columns. Thus there are ‘two nibbles in a byte’. But there is also ‘Base-16’ or ‘Hexadecimal’ where there are sixteen states, represented by 0 to 9, then A to F for the decimal numbers 0 to 15. But hang on! 15! That’s the maximum value that can be stored in a nibble! And that’s the point, so instead of having to type out ‘11010011’ to represent the decimal number 211, we can simply type ‘D3’. Therefore we can describe this like so:
Now that we can understand that a Byte stores a number and in principle that an electric circuit can be created to have a ‘byte’ that retains a number for us, then we have one of the building blocks of a computer that can use the value stored or ‘data’. But its just ‘data’, it has no meaning unless we attribute one to it to give it purpose so that it becomes ‘information’. And data can represent lots of different types of information, and critically, one type of information is an ‘instruction’ to do something.
Instructions and storage
Bytes are stored in memory or storage devices such as a hard disk drive. They are arranged one after another and indexed or ‘addressed’ using binary. Thus, you can have a byte in one location that represents an ‘instruction’, such as ‘add’ and then the next two bytes represent the numbers to add. Where the instruction ‘A4’ means to add the numbers ‘22’ and ‘20’ together and store in the next addressed byte, therefore we can show this as:
Note: I have just made this up and it does not represent a CPU that I know of.
The ‘binary’ form of the instruction ‘A4’ which is ‘10100100’, being a set of ‘switch states’ that tell the CPU to establish a certain circuit path within itself to perform the ‘Add’ with the data it will fetch and store in its ‘registers’ from memory.
You can read more about this area in my article ‘Interpretation of Data’, where this article is really a pre-cursor to it and could aid as an addition to understanding it.
Now that we’ve seen what a byte is and how the value it stores called ‘data’ is interpreted into ‘information’, then what about a real world example?
We all view web pages all the time, but what is that ‘data’ and its structure? If we use a ‘Packet sniffer’ such as ‘Wireshark’, then we can look at the contents of the data going across our network interfaces and understand it (as long as its not encrypted, such as with HTTPS), then we can see the request to get the ‘Moodle’ logo in the footer in the Boost theme:
Where I’ve highlighted in the sequence of bytes, the Internet Protocol version 4 (IPv4) address of the machine requesting the image, here being ‘192.168.1.99’ or ‘C0 A8 01 63’. You can also see lots of other data that is interpreted and structured in different ways, such as the TCP portion of the message containing the destination port ‘80’ that your web server will typically ‘listen to’ so that it can serve web pages. If you want to see how the information is encrypted with HTTPS, have a go at running Wireshark and look at the interactions you make with a HTTPS Moodle site.
Images themselves, as we have just requested (the ‘moodlelogo_greyhat’ SVG image) have their own structure too. In this case SVG – en.wikipedia.org/wiki/Scalable_Vector_Graphics, with is extended from XML – en.wikipedia.org/wiki/XML – which is text (I won’t go any further, but please do if you wish). But there are others that I’m sure your are familiar with such as JPEG and PNG files that you can see explained on en.wikipedia.org/wiki/JPEG#Syntax_and_structure and en.wikipedia.org/wiki/Portable_Network_Graphics#File_format.
And so on, bytes are interpreted in so many different ways to solve the problems that we want technology to do for us.
The world is made up of data, but what matters is how we interpret that data and derive the information we understand from it.
What do you think? Please let me know in the comments.