Topic 1b
Binary and Hexadecimal Integer Representations
Learning Outcomes
By the end of this topic students should be able to:
- Convert a binary representation (unsigned integer) to its equivalent base ten value.
- Convert a base ten value to its binary equivalent (unsigned integer).
- Convert a length 4 binary representation (unsigned integer) to its equivalent hexadecimal value.
- Convert a hexadecimal value to its binary equivalent (unsigned integer).
- Calculate the sum of two bit-strings with the solution expressed as a bit string.
- Calculate how many unique values can be stored in N bits.
Learning Materials
- Readings
- Binary representation of non-negative integers - pp 51-54
- Hexadecimal - pp 32-33
- Videos
- Crash Course Computing #4 - Representing Numbers and Letters with Binary
- Note, we are only going to be dealing with integers at this time. That ends at about 5:50 so you can stop at that point.
- https://www.youtube.com/watch?v=Xpk67YzOn5w
- Note, we are only dealing with part of this video from 0-3:45 and then 5:00-6:30
Checking for Understanding
If you want to get some practice working with binary you can use the following resources
- Some practice games I have coded up in Scratch
- Cisco has a fun Binary Game where you have to race against the timer
Answer the following questions from your textbook. The answers to all Q&E questions are in the back of your book in Appendix F.
- p56, #1
- p56, #2
- p56, #5 a and c (b&d are covered in the next topic)
- p34, #5
- p34, #6
Additional Guidance
- If you are still struggling with the material in this topic, the following videos may help.
- From binary strings to integers
- Explanation
- CFU p56, #1
- Note, I have a typo in my slides for 1e. I have only 4 1s (which is 15) but the book has 5 1s (which is 31).
- From integers to binary strings
- From binary strings to hexadecimal
- From binary strings to integers
Further Information
- None at this time.