Binary code: Difference between revisions

Content deleted Content added
m Reverted 1 edit by 2601:C2:1900:4190:6C33:B695:7A7A:A3FF (talk) to last revision by Citation bot
Binary is _not_ an encoding (it's a representation)
Line 1:
{{Short description|Encoding for|Encoded data, usingrepresented 0sin andbinary 1snotation}}
{{For|the binary form of computer software|Machine code}}
[[Image:Wikipedia in binary.gif|thumb |The wordASCII-encoded 'letters of "Wikipedia'" represented in [[ASCII]]as binary code, made up of 9 bytes (72 bits)codes.]]
[[FileImage:Binary to Hexadecimal or Decimal.jpg|thumb |BinaryValues torepresented Hexadecimalin orbinary, Decimalhex and decimal]]
A '''binary code''' represents [[plain text|text]], [[instruction set|computer processor instructions]], or any other [[data]] using a two-symbol system. The two-symbol system used is often "0" and "1" from the [[binary number|binary number system]]. The binary code assigns a pattern of binary digits, also known as [[bit]]s, to each character, instruction, etc. For example, a binary [[string (computer science)|string]] of eight bits (which is also called a byte) can represent any of 256 possible values and can, therefore, represent a wide variety of different items.
A '''binary code''' is the value of a [[data encoding |data-encoding]] convention represented in a [[Binary number |binary]] notation that usually is a sequence of 0s and 1s; sometimes called ''bit string''. For example, [[ASCII]] is an 8-[[bit]] text encoding that in addition to the [[human readable]] form (letters) can be represented as binary. ''Binary code'' can also refer to the [[mass noun]] ''code'' as a categorization of [[machine code]] and [[bytecode]].
 
Even though all modern computer data is binary in nature, and therefore, can be represented as binary, other [[numerical base]]s are usually used. [[Power of 2]] bases (including [[hexadecimal |hex]] and [[octal]]) are sometimes considered binary code since their power-of-2 nature makes them inherently linked to binary. [[Decimal]] is, of course, a commonly used representation. For example, ASCII characters are often represented as either decimal or hex. Some types of data such as [[image]] data is sometimes represented as hex, but rarely as decimal.
In computing and telecommunications, binary codes are used for various methods of [[encoding]] data, such as [[character string]]s, into bit strings. Those methods may use fixed-width or [[variable-length code|variable-width]] strings. In a fixed-width binary code, each letter, digit, or other character is represented by a bit string of the same length; that bit string, interpreted as a [[binary number]], is usually displayed in code tables in [[octal]], [[decimal]] or [[hexadecimal]] notation. There are many [[character sets]] and many [[character encoding]]s for them.
[[File:Binary to Hexadecimal or Decimal.jpg|thumb|Binary to Hexadecimal or Decimal]]
 
A [[bit string]], interpreted as a binary number, can be [[binary number#Decimal|translated into a decimal number]]. For example, the [[letter case|lower case]] ''a'', if represented by the bit string <code>01100001</code> (as it is in the standard [[ASCII]] code), can also be represented as the decimal number 97.
 
==History of binary codes==