Sometimes, for precise results and in order to overcome the limitations of a programming language, you need to control the content of CPU registers at the bit level. In such situations, you can make use of two things: bitwise operators and assembly language programming.
In this chapter, we will learn how to perform the following recipes in order to carry out low-level programming in C:
- Converting a binary number into a decimal using a bitwise operator
- Converting a decimal into binary using a bitwise operator
- Converting a decimal number into binary using bit masking
- Multiplying two numbers using the inline assembly language in C
- Dividing two numbers using assembly code in C