search
HomeCommon ProblemWhat is the range of 16-bit binary numbers?

What is the range of 16-bit binary numbers?

Dec 21, 2020 pm 12:00 PM
binary numbercomputer

The 16-bit unsigned binary number represents the range from 0 to 65535 (that is, 2 to the 16th power minus 1); the 16-bit signed binary number represents the range from (2 to the 15th power minus 1) plus Positive and negative signs, but computers usually use complement representation, so the range is "-32768" to "32767".

What is the range of 16-bit binary numbers?

Related recommendations: "Programming Video"

The range of integers that can be represented by 16 binary digits

If it is unsigned, it is 0 to 65535 (that is, 2 to the 16th power minus 1)

If it is signed, then the highest bit is used as the sign bit, indicating the range It is (2 to the 15th power - 1) plus a positive and negative sign, which is -32767 to 32767; however, computers usually use complement representation, so when there is a sign, the range is -32768 to 32767.

Detailed description:

All bits of unsigned binary numbers are numerical bits, so positive and negative are not considered. 16-bit binary can represent a total of 2^16 numbers, which is 65536 numbers. The minimum is 0000 0000 0000 0000 and the maximum is 1111 1111 1111 1111, which is 0~65535.

The first bit of a signed binary number is the sign bit, 0 means positive, 1 means negative, and all the remaining bits are numerical bits. The following is divided into original code, complement code and complement code for discussion:

1. In the case of original code, the minimum 16-bit binary number is 1111 1111 1111 1111, and the maximum is 0111 1111 1111 1111, that is, -32767 to 32767 .

2. In the case of inverse code, since the inverse code only inverts the numerical bits of the original code bit by bit and the sign bit remains unchanged, the actual representation range will not change.

3. In the case of two's complement code, since the complement code of 0 is unique, that is, 0000 0000 0000 0000, 1000 0000 0000 0000 does not represent 0, but -32768. Therefore, in the case of two's complement code, the minimum 16-bit binary number is 1000 0000 0000 0000, and the maximum is 0111 1111 1111 1111, which is -32768~32767.

To sum up, the 16-bit unsigned binary number represents the range from 0 to 65535, while the 16-bit signed binary number represents the range from -32768 to 32767 (in the complement case).

What is the range of 16-bit binary numbers?

To read more related articles, please visit PHP Chinese website! !

The above is the detailed content of What is the range of 16-bit binary numbers?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools