Understanding Bitshift Operations
- A simple understanding of basic programming (variables, if-else, loops, etc)
This short course covers the fundamental ideas behind bitshifting and where it is used in game programming.
We will analyze the real applications of bitshifting, understand why the math works, and review a couple of examples of source code that use bitshifting.
The lectures cover:
The math behind multiplication and division by the base in the decimal system
The math behind multiplication and division by the base in binary
The difference between left shift and right shift
Bitshift operators as processor instructions
Bitshift operators in high-level languages
Arithmetic and logical shifts
Examples of source code applications
Review of relevance and applications of bitshift operations in software development
There are no hardware or programming language requirements for this course. If you program in any high-level language (C, C++, Java, Python, Rust, etc) you will be able to follow along and understand how bitshifting works. But if you want to follow along and check the example source code, you'll need a basic code editor and a compiler.
- Programmers who want to learn how bitshifting works
- Programmers curious about the use of bitshifting in game development
- Introduction and Motivations
- Multiplication and Division in Base 10
- Multiplication and Division in Base 2
- Bitshifting in the Processor
- Examples of Code
- Arithmetic and Logical Shifts
- Applications and Relevance of Bitshifing
- Modern Compiler Optimization
- Discount on Our Other Courses
I teach computer science and mathematics at BPP University, London. My main research area is to investigate how teaching game programming can help enhance awareness and understanding of mathematics and physics.
I am also a professional software engineer with more than 10 years of experience, with an industry background in 3D systems, games and physics engines, web systems, databases, and data analysis.
My academic journey includes institutions such as Pittsburg State University, City University of London, and University of Oxford.