# Signed and Unsigned Integers

Learn about signed and unsigned integers.

We'll cover the following

## Signed and unsigned integers

Previously, we discussed the different set of integer types a language has. If we think about how negative numbers can be represented, weâ€™ll see that we have a problem. When working with binary numbers, we have several bits that can store either 0 or 1, but we donâ€™t have any other values, so we canâ€™t just insert a minus sign to indicate that this is a negative number. Instead, one of three methods can be used. Letâ€™s see how they work.

### Sign-magnitude representation (SMR)

Even if the name is a bit complicated, sign-magnitude representation is the easiest way to represent negative values in the binary format. Imagine that weâ€™re working with one byte that gives us eight bits to represent a value. However, if we assign one of the bits to represent whether this is a positive or negative value, weâ€™re left with just seven bits for the actual value:

Get hands-on with 1200+ tech skills courses.