Understanding Bitshift Operations

A short and beginner-friendly course on bitshift operations and how they are used in game programming
Free tutorial
Rating: 4.9 out of 5 (201 ratings)
6,164 students
1hr 6min of on-demand video
English [Auto]

How bitshifting is used in game programming
The math behind shift left and shift right
The difference between arithmetic and logical shifts


  • A simple understanding of basic programming (variables, if-else, loops, etc)


This is a short course that covers the fundamental ideas behind bitshifting, bitshift operators, and where it is used in the context of game programming.

This is a beginner-friendly course that has no real pre-requisites. We will start from the basics, analyzing the mathematics of how numbers work, and translate what we learn from the decimal system to the binary system.

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 course covers:

  • 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 bitshifting operations in software development

Bitshifting was very popular in early games. We will also discuss their current relevance and when we should consider using them in modern code.

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.

Who this course is for:

  • Programmers who want to learn how bitshifting works
  • Programmers curious about the use of bitshifting in game development


University Lecturer and co-founder of Pikuma.com
Gustavo Pezzi
  • 4.6 Instructor Rating
  • 3,810 Reviews
  • 26,364 Students
  • 4 Courses


My name is Gustavo Pezzi, and I'm a university lecturer in London, UK.

I teach fundamentals of computer science, low-level programming, and mathematics at Pikuma.

My academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.

I also have some useful scars from 15+ years of industry experience with 3D systems and software programming.

But after all is said and done, I'm just a guy who absolutely loves to teach... and I'm sure it shows.

Top companies trust Udemy

Get your team access to Udemy's top 16,000+ courses