Bit

format_list_bulleted Contenido keyboard_arrow_down
ImprimirCitar
1980 computer memory where you can see the physical bits. This set of about 4x4 cm corresponds to 4096 bits.

In computer science or information theory, the bit corresponds to a digit of the binary numbering system and represents the smallest unit of information. The term is an acronym for binary digit ('binary digit'; to a lesser extent called bit). The storage capacity of a digital memory is also measured in bits, as this word has several meanings.

The usual thing is that a digital record or other digital memories linked to computing and/or telecommunications, have an information representation capacity of, for example, 8 bits, 16 bits , 32 bits, 64 bits, etc; a binary memory has an effective representation capacity of one bit.

While the decimal number system uses ten digits (ten symbols), the binary uses only two digits, 0 and 1. A bit can represent one of two values: 0 or 1. Thus, a bit can be exemplified as a light bulb that can be in one of the following two states:

Off apagada or on encendida

Also, a bit can represent any two values, such as true or false, open or closed, white or black, north or south, etc.

Bit pooling

There are 4 possible pairs with two bits
Bit 1Bit 0
apagada 0apagada 0
apagada 0encendida 1
encendida 1apagada 0
encendida 1encendida 1

With one bit we can represent only two values or two different states, which are usually represented as 0, 1. To represent or encode more information in a digital device, we need a larger number of bits. If we use two bits, we will have four possible repeating variations:

VR22=22{displaystyle VR_{2}{2}{2}=2^{2}}}

  • 0 - They're both off.
  • 0 1 - The first one is "off" and the second "on"
  • 1 0 - The first one's "on" and the second "off"
  • 1 - They're both "on"

With these four variations we can represent up to four different values or states, such as the colors blue, green, red, and magenta.

Through sequences of bits, any discrete value such as numbers, words, and images can be encoded. Four bits make a nibble, and can represent up to 24 = 16 different values; eight bits make an octet, and up to 28 = 256 different values can be represented. In general, with n number of bits up to 2n different values or states can be represented.

Note: A byte and an octet are not the same. While an octet always has 8 bits, a byte contains a fixed number of bits, which need not necessarily be 8. In older computers, the byte could be made up of 6, 7, 8 or 9 bits. Today, in the vast majority of computers, and in most fields, a byte has 8 bits, being equivalent to an octet, but there are exceptions.

Position Value

In any positional numbering system, the value of the digits depends on their position.

In the decimal system, for example, the digit 5 can be 5 if it's in the units place, but it's worth 50 if it's in the tens place, and 500 if it's in the hundreds place. Generalizing, each time we move one position to the left, the digit is worth 10 times more, and each time we move one position to the right, it is worth 10 times less. This also applies to numbers with decimals.

+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
日本語 简体字 繁體字 Français Español العربية ← Position name
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LIC 100 UB 10 LIC 1 UB 1/10 LIC 1/100 UB ← Decimal digit value
+---------------+-----------------------------------------------------+ according to their position.
UD 10^2 UD 10^1 UD 10^0 UD 10^(-1) UD 10^(-2) Δ ← Decimal digit value
+---------------+-----------------------------------------------------+ according to their position.
↑ expressed in powers of 10
position of decimal coma

Therefore, the number 153.7 is actually: 1 hundred + 5 tens + 3 units + 7 tenths, that is:

100 + 50 + 3 + 0.7 = 153.7.

In the binary system it is similar, except that each time a binary digit (bit) moves one position to the left it is worth double (2 times more), and each time it moves to the right, it is worth half (2 times less).

+-----+-----+-------+-----+--------+------+-----+--
日本語 简体字 繁體字 Français Español العربية ← Value bit according to your position
+-----+-----+-----+-----+-------+ voiced in numbers
2^4 LIC 2^3 2^2 LIC 2^1 2^0 Δ 2^0 ← Value bit according to your position
+-----+-----+-----+-----+-------+ expressed in the form of 2-powers

Below we see represented the number 19.

16 + 2 + 1 = 19.
168421← Position value
encendidaapagadaapagadaencendidaencendidaGraphical representation
of bits like light bulbs
on and off
10011← binary digits (bits)

Fractional values can also be represented. Real numbers can be represented in fixed-point or floating-point format. Below we see the number 5.25 represented in a fixed-point binary form.

4 + 1 + 0.25 = 5.25
4211/21/4← Position value
encendidaapagadaencendidaapagadaencendidaGraphical representation
of bits like light bulbs
on and off
10101← binary digits (bits)

The above is a fixed-point representation of a real number in binary format. Although the floating point representation of real numbers is different from what is shown here, the schematic gives an idea of a part of the concept. Floating-point representation is similar to scientific notation on a handheld calculator, except that binary numbers are used instead of decimal numbers and the exponent is not in base 10 but in base 2.

Subscripts

When working with several numeral systems or when it is not clear which one you are working with, it is typical to use a subscript to indicate the numeral system with which a number has been represented. 10 is the subscript for numbers in the decimal system and 2 for those in the binary system. The examples below show two numbers in the decimal system and their binary equivalent. This equality is represented as follows:

  • 1910 = 100112
  • 5,2510 = 101.012

Most and least significant bits

An array or group of bits, such as a byte, represents a set of ordered elements. The bit that has a greater weight (greater value) within the set is called the most significant bit (MSB), similarly, the bit that has less weight within the set.

In a byte, the most significant bit is in position 7, and the least significant is in position 0.

+---+---+---+---+---+---+---+---+---+---+-
LIC 7 UB 6 LIC 5 LIC 5 LIC 4 UB 3 UB 2 LIC 1 LIC 0 UB ← Bit position
+---+---+---+---+---+---+---+---+---+---+-
UD128UD64 UD32 UD16 8 UD 8 UD 4 UD 2 UD 1 LIC ← Bit value according to position
+---+---+---+---+---+---+---+---+---+---+-
 Bit more significant  Bit less significant

In a 16 bit word, the most significant bit is in position 15 and the least significant is in position 0.

+----+----+--+----+----+--+--+---+---+---+---+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-+-+--
日本語 简体字 繁體字 繁體字 繁體字 繁體字 繁體字 繁體字 繁體字 繁體字 繁體字 Français Español العربية Русский bit+----+----+--+----+----+--+--+---+---+---+---+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-+-+--
UD2^15UD2^14B2^13B2^12B2^11BUSB2^10BUSB256BUSB128BODS64SID32 LIN16 8 FORM 8 Utilities 2 Utilities 1 ← Value bit Okay.
+--+--+----+--+----+--+--+--+---+---+---+---+--+---+---+---+---+---+---+---+ to your position
 Bit more significant  Bit less significant

Take, for example, the decimal number 27 encoded in binary form in one octet:

27=16+8+2+1=24+23+21+20{displaystyle 27=16+8+2+1=2^{4}+2^{3}+2^{1}+2^{0}} - poverty 0 0 1 0 1 1

Here, the first '0', the one on the left, (which corresponds to the coefficient of 27{displaystyle 2^{7}}), it's the bit most significant, being the last '1', the one on the right, (which corresponds to the coefficient of 20{displaystyle 2^{0}}The least significant.

In any case, the most significant bit is usually represented on the far left and the least significant on the far right. This is analogous to the decimal system, where the most significant digit is on the left and the least significant is on the right, for example, in the number 179, the most significant digit, the one with the greatest value, is 1., (the one with the hundreds), and the least significant, the 9, (the one with the units).

This concept of significance extends to the set of bytes that represent numbers or numerical values in computers.

Little endian and Big endian

Little endian and big endian refer to the order that machines assign to bytes that represent numbers or numeric values. A little endian machine allocates the least significant bytes at the lower end of memory, while a big endian machine allocates the most significant bytes at the high end. In computers, each byte is identified by its position in memory (address). When dealing with numbers of more than one byte, these bytes must also be ordered from least to greatest, indicating the position of the least significant byte and of the most significant byte. Thus, a byte with decimal number 27 would be stored on a little endian machine just as it would on a big endian machine, since only occupies one byte. However, for larger numbers the bytes that represent them would be stored in a different order on each architecture. This aspect is particularly important in assembly language or machine code programming, since some machines consider the byte located at the lowest memory address to be the least significant (little endian architecture, such as processors). Intel) while others consider that to be the most significant byte (big endian architecture, such as Motorola processors).

For example, consider the 32 bit (4 bytes) hexadecimal integer AABBCCDD, located at memory address 100. The number would occupy positions 100 to 103, but depending on whether the machine is little or big endian, the bytes would be stored differently:

Little-endian (like Intel)

100101102103
...DDCCBBAA...

Big-endian (like Motorola)

100101102103
...AABBCCDD...

In the images above, where memory locations 100, 101, 102, and 103 are represented growing from left to right, the big endian representation "looks" more natural, since We can read the number AABBCCDD correctly (see figure), while in the little endian representation the number seems to be upside down. However, there is nothing to prevent us from imagining that memory addresses "grow" from right to left, and when looking at memory this way, the little endian representation "looks natural" and is the big endian that “looks” backwards, as shown in the figures below.

Little-endian (like Intel)

103102101100
...AABBCCDD...

Big-endian (like Motorola)

103102101100
...DDCCBBAA...

Regardless of whether the machine is of little endian or big endian architecture, the bits within each byte are always in the same order, with the most significant bit on the left and the least significant on the left. the right. The processor registers, which can be from 4 bits to 64 bits, and more, also have their bits in the same order on both machine types. The difference between little and big endian only exists externally, in the order that bytes are represented in memory.

4, 8, 16, 32 and 64-bit architectures

When talking about 4, 8, 16, 32, 64-bit CPUs or microprocessors, it refers to the size, in number of bits, of the internal registers of the processor and also to the processing capacity of the arithmetic Unit logic (ALU). A 4-bit microprocessor has 4-bit registers and the ALU does operations on the data in those 4-bit registers, whereas an 8-bit processor has registers and processes the data in groups of 8 bits.

16-, 32-, and 64-bit processors have 16-, 32-, and 64-bit registers and ALUs respectively, and can generally process data, both in the bit size of their registers and, depending on their design, in certain submultiples of these. Thus, a 16-bit processor can process data in groups of 8 and 16 bits, behaving as if it were both an 8-bit and a 16-bit processor. A 32-bit processor can process data in groups of 8, 16, and 32 bits, and a 64-bit processor can process data in groups of 8, 16, 32, and 64 bits. In order to do this, 16-, 32-, and 64-bit processors generally have their registers split into smaller registers. Thus, the registers of a 32-bit processor, for example, can be divided into 16-bit and 8-bit registers and can perform arithmetic, logical, comparison, and other operations with any of its registers in any of these. sizes.

When we talk about processors of, say, 32 bits, we mean their ability to process data in up to 32 bits simultaneously (it can also process data in 8 and 16 bits). The term "32-bit microprocessor" It does not refer to the size of the CPU's data bus or address bus, but to its ability to work normally with data in the maximum number of bits (with some exceptions).

For example, the first processors on the x86 architecture, the Intel 8086 and Intel 8088, were 16-bit processors, because they had 16-bit (and 8-bit) registers, and their arithmetic logic units could perform 16-bit operations. bits (and 8 bits). Outwardly, however, the 8086 had a 16-bit data bus and could move data to and from the CPU in 8-bit and 16-bit blocks, while the 8088 had only an 8-bit data bus, and could also move 8 and 16 bit data to and from the CPU, however, since its data bus was only 8 bits, to move 16 bits of data it had to do two read or write operations, 8 bits, because of its limited databus. This was completely transparent, the two processors were running the exact same 16-bit instruction set, only the 8088 was slower each time it had to read or write 16 bits of data to or from memory.

Bit in the movies

In the movie Tron, a bit is represented by a white polyhedral shape that is a compound of dodecahedron and icosahedron. You can only say "yes" (on) and "no" (off). When the bit says "yes" it briefly changes into a yellow octahedron, and when he says "no" he transforms into a red-tipped form. If alarmed, repeat the word several times, for example: "No no no no no no!".

Contenido relacionado

3D computer graphics

3D computer graphics or computer graphics are graphics that use a three-dimensional representation of geometric data that are stored on the computer for the...

MediaWiki:Watch details

There are $1 pages on your watchlist (not counting discussion pages); you can see and modify the complete...

Logo (programming language)

Logo is a high-level programming language, partly functional, partly structured; very easy to learn, which is why it is usually the preferred programming...
Más resultados...
Tamaño del texto:
undoredo
format_boldformat_italicformat_underlinedstrikethrough_ssuperscriptsubscriptlink
save