- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Unsigned binary integers

Unsigned binary integers are numbers without any ‘+’or ‘-’ sign. Here all bits representing the number will represent the magnitude part of the number only. No bits will remain reserved for sign bit representation. An unsigned binary integer is a fixed-point system with no fractional digits.

Some real life Examples are −

Number of tables in a class,

The number of a member of a family.

Obviously, they are unsigned integers like 10 and 5. These numbers have to be represented in a computer using only binary notation or using bits.

Numbers are represented in a computer using a fixed size, like 4, 8, 16, 32 bits, etc. If numbers are represented in a computer using 8 bits, it is said that the computer uses 8-bit word size. Generally, word sizes are a power of 2. Modern computers typically support binary integers of 8 (i.e. 2^{3}),16 (i.e. 2^{4}),32 (i.e. 2^{5}),or 64 (i.e. 2^{6})bits.A tabular column of some decimal numbers and their equivalent in unsigned binary is shown in the following, assuming a word size of 4bits.

Number | Unsigned binary notation |
---|---|

5 | 0101 |

13 | 1101 |

0 | 0000 Minimum number, which is 0 |

15 | 1111 Maximum number, which is (2^{4} -1) |

In this table,

5 in binary representation is −

2 | 5 |

2 | 2 Remainder 1 |

2 | 1 Remainder 0 |

2 | 0 Remainder 1 |

So it is − 0101

And 0101 in decimal representation is − 0*2^{3} +1*2^{2} +0*2^{1} +1*2^{0}

From this, it is obvious that if the word size is n bits, the range of (2^{n} –1) numbers can be represented as ranging from 0 to (2^{n} –1). A table of word size and the range of unsigned integers that can be represented is shown here –

Word size | The range for unsigned numbers |
---|---|

4 | 0 to 2^{4}- 1 or 0 to 15 |

8 | 0 to 2^{8}- 1 or 0 to 255 |

16 | 0 to 2^{16}- 1 or 0 to 65535 |

32 | 0 to 2^{32}- 1 or 0 to 4,294,967,295 |

64 | 0 to 2^{64}-1 or 0 to 1.844674407x 10^{19} |

In other words, when the word size is only 4 bits, it is not possible to represent a number like 223. The minimum word size has to be 8 bits to represent the number 223.

- Related Questions & Answers
- Unsigned and Signed Binary Numbers
- Signed binary integers
- What is unsigned in MySQL?
- Sorting Integers by The Number of 1 Bits in Binary in JavaScript
- What is an unsigned char in C++?
- Convert varchar to unsigned integer in MySQL
- What are signed and unsigned keywords in C++?
- Add two unsigned numbers using bits in C++.
- Difference between signed and unsigned integer in Arduino
- Restoring Division Algorithm For Unsigned Integer in C++
- Median in a stream of integers (running integers) in C++
- ConvertDecimal to equivalent 32-bit unsigned integer in C#
- How to convert integers into integers written in words in R?
- Powerful Integers in Python
- Group Integers in Python