How To Use This Book
How To Do Well In This Course
Below is a list of all the links to all the little practice tools I've made throughout this book. I think these tools can be very helpful if they are used right. How do you use this book? First, you have to ask yourself why you are using this book. Are you using this resource because you are hoping it will give you the answers you need to get an A, or do you actually want to learn computer science?
If you are attending college and spending tens of thousands of dollars a year to get a degree in computer science and you actually want to learn computer science, congrats! This book and its resources will most likely be incredibly helpful for you.
If you are looking to Google your way to an easy-A, I'm afraid you're out of luck. I do have one resource for you. If you look at your laptop, you'll find this incredible tool called a "keyboard". Historically, this tool has been used by great minds to immortalize and disseminate their thinkings and creations. If you're looking for all your answers on the internet, sadly most of the buttons on this "keyboard" will be useless to you as you do not have any original thoughts to share. Even if you find all these buttons to be just as scary as thinking for yourself, there are three you may find useful: "Ctrl + C" and "Ctrl + V". I'm sure I could find more resources for you, but I'd rather not waste my time training you to mindlessly copy and paste questions and answers from the internet when Siri, Cortana, the Google Assistant, etc. are already free.
For those of you that aren't Authentic Idiots aiming to acquire Artificial Intelligence, you need two things to do well in this course: computer science knowledge and problem-solving skills. This course is designed to provide you with the computer science knowledge you need to do well in this course. These problems are meant to be used as practice to build and reinforce your knowledge of the material in this class. As you practice, you will get better at problem-solving (assuming you actually practice with a pencil and paper and not just Google the answers).
However, this practice alone will not fully prepare you for the exams or the rest of your computer science career. The following problems are a set of tools. Knowing how to represent a base-10 number in binary is a "hammer". Knowing how boolean gates interpret binary is a "saw". You can be very good at using a hammer, driving each nail in perfectly straight every time. You can be very good at using a saw, making the cleanest and most accurate cuts every time. If I asked you to hammer a nail for me or to cut a board for me, you'd do it perfectly. However, if I asked you to build me a birdhouse, could you do it? Would you be able to look at the birdhouse, figure out how many boards you'd need, how many cuts you'd need to make, and know where to hammer each nail? Or, would you immediately get stuck and quit because you don't have a "birdhouse tool" in your toolbox?
Let's say you don't know how to use a hammer or a saw. If I came to you with a birdhouse and said "build this", how would you handle that? You might be able to identify the separate pieces and see how the nails connect the boards. Even if you know can figure out how the final pieces go together, you'll never be able to build your own birdhouse without knowing how to use a hammer and saw. Perhaps you could figure out how to cut a board without a saw, but it'll take much more time and energy than just learning how to use a saw. Then, if I saw your birdhouse I would assume you know how to use a hammer and saw and I may ask you to build a coffee table for me now. If you knew how to use a hammer and saw, this would be a very simple task. If you don't, you now have to start the process over again and relearn how to cut and connect boards when building a coffee table.
Going even further into this toolbox analogy, let's say we don't know how to use a hammer to build a birdhouse, but we have basic problem-solving skills and a saw. We know we need wooden boards that will be cut to size with our saw, but we still need to figure out how to connect these boards. If we know how to use a screwdriver, then we don't need a hammer anymore. It does mean we'll have to adjust the way we build our birdhouse since we can't use nails anymore, we have to use screws. What kind of screws do we need? Does the type of screw we need affect the type of screwdriver we use or how we use it? You can see that even if we're struggling to use a hammer if we understand other tools and the problem at hand, we can still build a birdhouse.
As we gain mastery of many tools, we realize we have many different ways to build a birdhouse. Instead of building just any birdhouse, I can build a durable birdhouse or a pretty birdhouse depending on which tools I use. Perhaps I'll use a screwdriver since it's more delicate than a hammer. Maybe I'll use a hammer to save time when attaching boards. The more we understand our tools, not just how to use them, but also when to use them, the better we become at problem-solving. Now, instead of finding "the only solution", we're finding a faster solution, or a more efficient solution, or a more effective solution, and we're doing it in less time than others who don't have those tools.
At the start, I stated that knowing how to represent a base-10 number in binary is a hammer. By using the tools below and repeatedly converting a random base-10 number to binary would be like having a plank of wood and hammering a box of nails into it. You aren't building anything, but you're getting better at using a hammer. Let's say our birdhouse is the CS-164 final exam. By doing these repeated conversions, you're not answering questions that will be on the exam, but if a question requires you to perform binary operations on a base-10 number, you'll be prepared to handle it. If there's a question on a lab that you don't know the answer to, Googling solutions won't help you learn the tools well enough to use them elsewhere, like on an exam. As we learn more about computer science, we gain more tools in our toolbox which allows up to become better problem solvers.
The following practice problems focus on building your toolbox. If you treat them as skills and not answers, you'll also become very good at problem-solving. I can teach you everything I know about computer science, but it's up to you to listen, learn, and apply it.
Practice Glossary
Section 1.3: Base-16
RGB Color BoxHexadecimal to Decimal
Hexadecimal to Binary
Hexadecimal to Base-4
Binary to Hexadecimal
Section 2.1: Negative Numbers
Positive or NegativeSigned Binary to Decimal
Decimal to Signed Binary