This commit is contained in:
Miloslav Ciz 2022-12-25 22:32:33 +01:00
parent 69d24f55e1
commit 8bbd48afb6
3 changed files with 12 additions and 11 deletions

View file

@ -1,6 +1,6 @@
# Binary
Binary refers to to having two choices; in [computer science](compsci.md) binary refers to the base 2 numeral system, i.e. a system of writing numbers with only two symbols, usually [1](one.md)s and [0](zero.md)s. Binary is used in computers because this system is easy to implement in electronics (a switch can be on or off, i.e. 1 or 0; systems with more digits were tried but unsuccessful, they failed miserably in reliability). The word *binary* is also sometimes used as a synonym for a native [executable](executable.md) program.
The word binary in general refers to having two choices; in [computer science](compsci.md) binary refers to the base 2 numeral system, i.e. a system of writing numbers with only two symbols, usually [1](one.md)s and [0](zero.md)s. We can write any number in binary just as we can with our everyday [decimal](decimal.md) system, but binary is more convenient for computers because this system is easy to implement in [electronics](electronics.md) (a switch can be on or off, i.e. 1 or 0; systems with more digits were tried but unsuccessful, they failed miserably in reliability). The word *binary* is also by extension used for non-textual computer [files](file.md) such as native [executable](executable.md) programs or asset files for games.
One binary digit can be used to store exactly 1 [bit](bit.md) of [information](information.md). So the number of places we have for writing a binary number (e.g. in computer memory) is called a number of bits or bit **width**. A bit width *N* allows for storing 2^N values (e.g. with 2 bits we can store 4 values: 0, 1, 2 and 3).
@ -30,5 +30,6 @@ As anything can be represented with numbers, binary can be used to store any kin
- [bit](bit.md)
- [hexadecimal](hexadeciaml.md)
- [De Morgan's laws](de_morgans_laws.md)
- [data structure](data_structure.md)
- [data type](data_type.md)