Course
Skills

# Math For Programmers

This course covers the maths behind how your computer stores and manipulates data. You'll learn how to read binary and hexadecimal, how both integers and floating point numbers are stored and the limitations of using them. Advice on best practices and how to work effectively with boolean values and bitwise operators.

## What you'll learn

Have you ever wondered exactly why displaying the contents of memory often gives strange-looking numbers like 0x38FF that contain letters? Or puzzled over a time when your code added two floating point numbers but the result wasn't quite correct? If so, then this is the course for you.

This course aims to teach you the mathematics behind how computers store and manipulate numbers and booleans. You'll learn, amongst other things:

• How to read binary and hexadecimal numbers
• Why floating point numbers are almost always stored with small errors
• How to estimate how big those errors are
You'll find out how to simplify complex logical expressions, or how to use logical operators and bitwise flags to very efficiently store and manipulate sets of true/false properties.

The course also features lots of advice on best practices for working with numerical and boolean data. Underpinning all this, you'll learn how to see your data the way a computer sees it. When your job involves writing or debugging code that manipulates millions of bytes of data, that is a very useful skill to have.

## Table of contents

Math for Programmers
8mins
Working in Binary
46mins
Integers
58mins
Floating Point Numbers
83mins
Logic, Booleans and Bitwise Operations
48mins
Errors and Accuracy
40mins

## Course FAQ

What will I learn in this course?

In this course you will learn about:

• How data is stored in computers
• How to read and understand binary
• How to read and understand hexadecimal code
• Integers and floating point numbers
• How to work with boolean values
• How to work with bitwise operators
• Arithmetic and error propagation
• Much more
What is binary?

Binary is a number system made up of only 0s and 1s, which represent "off" or "on" respectively. This allows numbers to be represented physically inside the computer, which makes it possible for the device to perform calculation. Binary is used to write data, like instructions for the computer processor.

What is hexadecimal?

Hexadecimal, or hex, is a number system that uses 16 as its base, rather than 10. Rather than just using the digits 0-9, it also uses letters A-F to represent values of ten to fifteen. Hexadecimal simplifies how binary is represented, so an 8-bit binary number becomes a 2-digit hex number.

Who should take this course?

This course is for anyone who wants to learn the mathematics behind how computers store and manipulate numbers and booleans! It is also great if you are trying to learn how to read binary and hexadecimal numbers.

Are there any prerequisites?

There are no strict prerequisites to this course, but it is intermediate level material, so come prepared to exercise those mental muscles!

## About the author

Simon Robinson first cut his developer teeth in the early 1980s writing a scheduling system in BBC Basic(!) for his local college. Since then, his programming career has spanned industries ranging from academic research to telecoms to finance, and many computer languages such as C++, C# and Python, as well as writing front-end and back-end code for Windows and Web. He believes knowledge is to be shared, and has written or co-written more than a dozen books for professional programmers, includin... more

Ready to upskill?