Last Sync: 2022-10-06 10:30:05
This commit is contained in:
parent
cdd2bc27ff
commit
d0ca9a56f7
2 changed files with 15 additions and 3 deletions
|
|
@ -5,8 +5,20 @@ categories:
|
|||
tags: [binary]
|
||||
---
|
||||
|
||||
# Text encoding
|
||||
# Binary encoding
|
||||
|
||||
## What is binary encoding
|
||||
We know that everything going on in a computer is the manipulation of binary digits. Thus all data must ultimately reduce to binary numbers controlled through logic circuits.
|
||||
|
||||
We know that everything going on in a computer is the manipulation of binary digits. Thus all data must ultimately reduce to binary numbers controlled through logic circuits. _Encoding_ is the process of establishing a correspondence between certain binary numbers and symbols. For certain essential data types, for instance alphanumeric characters and colours, there are agreed standards of encoding such that, for example, that (binary) and `3F` (hex) always corresponds to the character `?`.
|
||||
_Encoding_ is the process of establishing a correspondence between certain binary numbers and symbols. For certain essential data types, for instance alphanumeric characters and colours, there are agreed standards of encoding such that, for example, that `111111` (binary) and `3F` (hex) always corresponds to the character `?`.
|
||||
|
||||
The length of the binary number is determined by the number of variations that you require to capture a given dataset. For example, say we know that there are 18 levels to a computer game. To encode a reference for each level we would need a binary number that is capable of at least 18 total variations.
|
||||
|
||||
Here, a 32-bit ($2^{5}$) number would be best because the next smallest (16-bit) would not be sufficient. Our levels would have representations as follows:
|
||||
|
||||
```
|
||||
00001 (1)
|
||||
00010 (2)
|
||||
00011 (3)
|
||||
00100 (4)
|
||||
...
|
||||
```
|
||||
|
|
|
|||
0
Hardware/Binary/Text_encoding.md
Normal file
0
Hardware/Binary/Text_encoding.md
Normal file
Loading…
Add table
Reference in a new issue