Nice to meet you!
Professor for Data Modelling & Interdisciplinary Knowledge Generation at University of Bayreuth
Computer scientist who enjoys collaborating with people from other disciplines.
My learning objective for you:
What do you expect from this course?
Access to slides, code & material
https://mircoschoenfeld.de/lecture-bits-bytes-and-beyond-foundations-of-computer-science.html
We use element to stay in touch.
Exploring “Bits, Bytes, and Beyond”
Computers are digital.
That means they have two states.
Haaschreck (2022)
Smallest unit of information is called a Bit.
One bit alone doesn’t store much information.
We use sequences of bits to store more.
Bits | Store |
---|---|
00 | earth |
01 | water |
10 | fire |
11 | air |
2 bits distinguish 4 things;
3 bits distinguish 8 things;
8 bits, distinguish 256 things.
How many things can we distinguish
using a bit sequence of
length n?
A bit sequence of length 8 is called a Byte.
A bit sequence of length 8192 is called a Kilobyte (kB).
One Kilobyte consists of \(1024 = 2^{10}\) Byte.
Wait, a kilo-byte has 1024 Bytes? Doesn’t kilo mean 1000?
If you need to precisely refer to 1024 Bytes, say kibibyte.
Kibi means Kilo + Binary.
What other names of bit sequences of a certain length do you know?
Let’s use these sequences to encode information.
How can we represent whole numbers using bit sequences?
Does your scheme support negative numbers?
How can we represent texts using bit sequences?
Bits | Store |
---|---|
00 | E (earth) |
01 | W (water) |
10 | F (fire) |
11 | A (air) |
EEW \(\hat{=}\) 000001
011011 \(\hat{=}\) WFA
How can we encode
“Hello class!”
And how many bits should we use per sign?
Shabaz1000 (2024)
Some available encodings:
ASCII | 7 Bits, 128 characters |
ASCII ext. | 8 Bits, 256 characters |
UNICODE | 16 Bits, 65536 characters |
ISO 10646 | 21 Bits, future proof. |
How can we encode images?
How can we encode this image?
Tantau (2016)
How can we encode this image?
Tantau (2016)
How can we encode this image?
Tantau (2016)
Computers store everything as bit sequences.
Unit | Definition | What you can store with it |
---|---|---|
Bit | Binary Digit / 0 or 1 | not much |
Byte | 8 Bits | Letters in latin alphabet |
Kilobyte (kB) | 1024 Byte or 1000 Byte | small icon, half page of text |
Megabyte (MB) | 1024 kB or 1000 kB | a book, a minute of musik, a second of HD-movie |
Gigabyte (GB) | 1024 MB or 1000 MB | a move, a genome |
Terabyte (TB) | 1024 GB or 1000 GB | Wikipedia |
Kibibyte | always 1024 Byte |
In this lecture, we want to learn about algorithms.
Al-Jabr, or
“The Compendious Book on Calculation”
Al-Khwarizmi (820AD)
A “landmark work in the history of mathematics”, written in 820 by Muhammad ibn Musa al-Khwarizmi.
Al-Khwarizmi (820AD)
Carpenter (1836)
Lovelace describes an algorithm to compute Bernoulli numbers in her notes to Babbage’s lecture notes in 1842.
Lovelace (1842)
It is considered to be the first published algorithm ever specifically tailored for implementation on a computer.
Lovelace (1842)
Algorithms are finite sequences of instructions,
typically used
to solve specific problems.
Escape the maze!
Algorithms
Programs
The vast majority of algorithms use variants of control instructions:
Problems can only be solved in a meaningful
way if the problem is
clearly defined.
A “clear problem definition”
is called a
specification.
Specifications should answer the following comprehensively:
Aim of this lecture
Acknowledgement:
This script is inspired by Tantau (2016).