When we do math on a computer, things don't go exactly the way they did in math class. In this video, I show how integers behave differently. There are two things that are different. First, the size of integers is often fixed, so we have to worry about what happens when are calculations exceed that range (we call that overflow or underflow). Second, the computer actually has three strategies it might use for division: real division, integer division, and floor division.
In this video I'll walk you through:
Each of the three encodings (EBCDIC, ASCII, and Unicode)
The pros and cons of choosing each of those encodings
How integers (like those in Unicode) can be stored using UTF-8
Why UTF-8 is a good choice for storing Unicode values
TIMESTAMPS
0:00 Intro
0:09 Integers have fixed width
0:30 Overflow
2:06 Intermediate overflow
3:11 Real vs. Integer Division
4:17 Floor Division
ABOUT MY CHANNEL
My channel is about good software engineering practices. We cover introductions to programming in C and Java. But I also have lots of software and computer engineering topics like PIC programming, advanced programming techniques, and things that distinguish good code from code that works.
Check out my channel here:
/ @wizardcraftcode
Don’t forget to subscribe!
CHECK OUT MY OTHER VIDEOS:
How integers are stored: • Storing Integers - Unsigned, Signed Magnit...
C Programming Playlist: • Coding in C
Intro to Java Playlist: • Introduction to Java Programming based on ...
Software Engineering Topics Playlist: • General Software Engineering Topics