Revisiting ideas about information
Completed
Encryption vs Encoding
Cryptography in History
Revisit Info Theory Concept
About Control Flow
Finish our Caesar Cipher
Today
Revisiting Information Theory Concepts
Upcoming
Compression
Quiz eventually
As we write programs, we are drafting sets of instructions for our computer to follow. In this process, we are telling the computer to hold information in its memory. Then, it runs different processes or operations on this held information, or due to this information, to then do something for us- hopefully what we wanted it to do.
We are writing information, to tell our computer what to do with information, that will then be stored and/or displayed. There's a lot of information going on.
For our computer to respond based on information, we use the control methods we've talked about- selection or iteration. Let's talk a bit more about iteration for a moment.
Its been a while since we talked about information theory. Information theory is about studying the transmission, processing, extraction, and utilization of information. Abstractly, information can be thought of as removing uncertainty.
Let's hear a bit more about information in general.
Claude Shannon's work allowed us to think about our world in a new way, in a way that allowed us to represent things in a series of bits, in a series of 1's and 0's, in binary. In the computer, this binary system is essentially impulses of electricity.
We've mentioned binary several times now, including when we looked at the ASCII chart.
When we talk about programming, high-level are programming languages like Python and C and Java and Javascript and any programming language that more-or-less is pretty easy for someone with a little familiarity to understand. It has keywords like IF, and WHILE, and FOR. Low-level are things like assembly code, machine code, and binary.
A computer can run low-level code much faster than high-level code; but low-level code is really hard for programmers to write. Computers are so fast now, that most of the time we don't care if high-level code takes longer for a computer to run.
We like to program in high-level languages, but the computer hardware doesn't actually understand high-level code.
Instead, when we run a Python or Java or some other sort of code, our operating system (also a program) runs an interpreter (also a program) that will convert our high-level code into low-level machine code that the hardware actually understands.
This is why it takes longer to run high-level code than low-level code.
Computers represent all data in binary, so all types of files, from text to images to videos, are ultimately sequences of bits. How we represent things in bits is defined by the people that design these systems. That also means we can create other systems to store things in bits more efficiently- we looked at this a bit already when we talked about the playing cards and how to represent them. In a general sense, compression just means taking something and making it smaller.
There are other clever ways that computer scientists have managed to compress data. Data can only be compressed so much without losing information though. Sometimes that matters... sometimes we don't actually care if we lose a little data.
Here's a brief video on the topic.