This page intentionally left blank. ⬇️, ➡️, or spacebar 🛰 to start slidedeck. --- # .center[💻 Computers 💻] # 👾 # .center[ 👾 ] # .right[ 👾 ] --- # Computers .center[![](/img/computer_science_soft_magic.gif)] --- # Computers - Binary - Bits and bytes - Endian-ness - Unicode - Hex - Magic numbers - Programming languages --- # Binary Computers are made up of "ones and zeros." It means it's made up of a binary system where everything is translated down into 0 or 1, or "no" and "yes" or "off" and "on." It's similar to how Morse Code is composed completely of dots and dashes. I'm not going to get into how computers make sense of all of this, but binary counting is explained well [here](https://medium.com/basecs/bits-bytes-building-with-binary-13cb4289aafa). --- # Bits and bytes bit = BInary digiT byte = 8 bits A lot of things get sorted out at the byte-level, which is why it is referred to so often. --- # Little endian, Big endian Endianness refers to how bytes have been arranged and it necessary to know how to read a file. It's *sort of* like whether a file is held in memory backwards or forwards (but it's more complicated than that). Big endian = Bytes are ordered from the most significant bit Little endian = Bytes are ordered from the least significant bit. --- # Bit significance? The most significant bit is the one of highest significance, often read as the number on the most left. If a bit string was read in the same way we counted, it would be the ten-million point. Conversely, the least significant bit is the one on the far right. *I think this is true but it might be more complicated than this* --- # ASCII, Hexadecimal, Unicode These are all character encodings that help you talk to your computer, or for your programs to talk to your computer. They are like human-computer translation devices. --- # Back to Base We count in base-10, which means we get to nine and then we go to one-plus-zero, or ten. Binary is just 0 and 1. Hexadecimal is base16, which means it gets to 16 and then starts over. It's confusing to think about. But they are represented in our common human-language as 0-9 and A-F. --- # Hexadecimal One Hexadecimal can represent four bits. That's half a byte (also known as a nibble -- yeah, really). So hexadecimal in pairs, you can do cool stuff with. For example, the way color is displayed on computers using RGB is made up of 6 hex numbers (which is why A-F are in there too) and are broken into [Red part] | [Green part] | [Blue part] ! A really great overview is available [here](https://medium.com/basecs/hexs-and-other-magical-numbers-9785bc26b7ee). --- # Reading hex - xxd - hexdump - [hexyl](https://github.com/sharkdp/hexyl) --- # Unicode I think it's well-known that emoji is possible because of Unicode. Unicode is another way to encode characters. Although Unicode isn't just Unicode, there are many different kinds of Unicode. Anyway, it's true what they say about emoji. Unicode also allows for very large and complex languages, like those based on Chinese characters, to be presented properly on screens. --- # � Mojibake! � � � � (It's pronounced moh-gee-bah-k, not "'moji bake" like a BBQ featuring emoji) Mojibake is what happens when computers don't speak the same language to each other. But because computers seem to aim to please, they do their best to give you what you want anyway, which sometimes just looks like garbage. --- # Magic numbers Magic numbers (can mean a lot of things but also) are one way for file formats to identify themselves, usually but not necessarily at the beginning of a file. In this case, they might also be referred to as "file signatures." The magic number for the audio format FLAC is `66 4C 61 43` in hexadecimal, which becomes `fLaC` when translated to text. --- # Programming languages Programming languages are also like translation devices between you and your computer, just bigger. There are many different types of programming languages. Here are some loose categories by which they are often defined: - functional - imperative - declarative - object-oriented - procedural - logic --- # Programming languages These languages can be `compiled` or `interpreted`: Do you have to do an extra step to put your code together before you run it, or can you just run it? For example, QCTools is built in C++ and I have to build it every time I went to test some code. A Python script can be run by typing `python cool-script.py` into Terminal. --- # Additional Resources - [baseCS](https://medium.com/basecs) - [baseCS podcast](https://www.codenewbie.org/basecs) - [Corkami Basics of Computing visualizations](https://github.com/corkami/pics/blob/master/binary/README.md) - [CS50: Introduction to Computer Science](https://www.edx.org/course/introduction-computer-science-harvardx-cs50x#!) - [Hack the Kernal](https://www.ops-class.org/) - [Open Source Society University: CS Degree](https://github.com/ossu/computer-science) - [Information Technologies at Pratt Syllabus](https://github.com/hadro/654fa17) - [The Programming Historian](https://programminghistorian.org/lessons/) - [The Route of a Text Message](http://scottbot.net/the-route-of-a-text-message/) - [Python for Librarians](https://data-lessons.github.io/library-python/) - [What is Code? by Paul Ford](http://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/) - [What is a digital file? by Nicole Martin](https://twobitpreservation.com/bits-blog/2017/5/15/what-is-a-digital-file) --- # Hacking games - [Box 256](http://box-256.com/) - [Colobot](https://colobot.info/learn-more/) - [else Heart.Break()](http://elseheartbreak.com/) - [Hacknet_Labyrinths](https://hacknet-os.com/) - [MicroAdventure](https://microadventure.net/) - [Microcorruption](https://microcorruption.com/about) - [TIS-100](https://www.zachtronics.com/tis-100/) - [Uplink](https://www.introversion.co.uk/uplink/) --- # Learning more - [Command Line Interface](/presentations/cli.html) - [Networks](/presentations/networks.html) - [Databases](/presentations/databases.html) [Home](/)