HOME

TheInfoList



OR:

A bitstream (or bit stream), also known as binary sequence, is a
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
of bits. A bytestream is a sequence of
byte The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
s. Typically, each byte is an 8-bit quantity, and so the term octet stream is sometimes used interchangeably. An octet may be encoded as a sequence of 8 bits in multiple different ways (see
bit numbering In computing, bit numbering is the convention used to identify the bit positions in a binary number. Bit significance and indexing In computing, the least significant bit (LSb) is the bit position in a binary integer representing the lowes ...
) so there is no unique and direct translation between bytestreams and bitstreams. Bitstreams and bytestreams are used extensively in
telecommunications Telecommunication, often used in its plural form or abbreviated as telecom, is the transmission of information over a distance using electronic means, typically through cables, radio waves, or other communication technologies. These means of ...
and
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
. For example, synchronous bitstreams are carried by SONET, and
Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the main communications protocol, protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, th ...
transports an
asynchronous Asynchrony is any dynamic far from synchronization. If and as parts of an asynchronous system become more synchronized, those parts or even the whole system can be said to be in sync. Asynchrony or asynchronous may refer to: Electronics and com ...
bytestream.


Relationship to bytestreams

In practice, bitstreams are not used directly to encode bytestreams; a communication channel may use a signalling method that does not directly translate to bits (for instance, by transmitting signals of multiple frequencies) and typically also encodes other information such as framing and
error correction In information theory and coding theory with applications in computer science and telecommunications, error detection and correction (EDAC) or error control are techniques that enable reliable delivery of digital data over unreliable communi ...
together with its data.


Examples

The term bitstream is frequently used to describe the configuration data to be loaded into a field-programmable gate array (FPGA). Although most FPGAs also support a byte-parallel loading method as well, this usage may have originated based on the common method of configuring the FPGA from a serial bit stream, typically from a serial PROM or
flash memory Flash memory is an Integrated circuit, electronic Non-volatile memory, non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for t ...
chip. The detailed format of the bitstream for a particular FPGA is typically proprietary to the FPGA vendor. In mathematics, several specific infinite sequences of bits have been studied for their mathematical properties; these include the
Baum–Sweet sequence In mathematics the Baum–Sweet sequence is an infinite automatic sequence of 0s and 1s defined by the rule: :''b'n'' = 1 if the binary representation of ''n'' contains no block of consecutive 0s of odd length; :''b'n'' = 0 otherwise; for ...
,
Ehrenfeucht–Mycielski sequence The Ehrenfeucht–Mycielski sequence is a recursively defined sequence of binary digits with pseudorandom properties, defined by . Definition The sequence starts with the single bit 0; each successive digit is formed by finding the longest suffix ...
,
Fibonacci word A Fibonacci word is a specific sequence of Binary numeral system, binary digits (or symbols from any two-letter Alphabet (formal languages), alphabet). The Fibonacci word is formed by repeated concatenation in the same way that the Fibonacci num ...
, Kolakoski sequence, regular paperfolding sequence,
Rudin–Shapiro sequence In mathematics, the Rudin–Shapiro sequence, also known as the Golay–Rudin–Shapiro sequence, is an infinite 2- automatic sequence named after Marcel Golay, Harold S. Shapiro, and Walter Rudin, who investigated its properties. Definition E ...
, and
Thue–Morse sequence In mathematics, the Thue–Morse or Prouhet–Thue–Morse sequence is the binary sequence (an infinite sequence of 0s and 1s) that can be obtained by starting with 0 and successively appending the Boolean complement of the sequence obtained thus ...
. On most
operating systems An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
, including
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
and
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, standard I/O libraries convert lower-level paged or buffered
file access File or filing may refer to: Mechanical tools and processes * File (tool), a tool used to remove fine amounts of material from a workpiece. ** Filing (metalworking), a material removal process in manufacturing ** Nail file, a tool used to gen ...
to a bytestream paradigm. In particular, in Unix-like operating systems, each process has three
standard streams In computer programming, standard streams are preconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin), ...
, which are examples of unidirectional bytestreams. The Unix pipe mechanism provides bytestream communications between different processes. Compression algorithms often code in bitstreams, as the 8 bits offered by a byte (the smallest addressable unit of memory) may be wasteful. Although typically implemented in low-level languages, some high-level languages such as Python and Java offer native interfaces for bitstream I/O. One well-known example of a
communication protocol A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any variation of a physical quantity. The protocol defines the rules, syntax, semantics (computer science), sem ...
which provides a byte-stream service to its clients is the
Transmission Control Protocol The Transmission Control Protocol (TCP) is one of the main communications protocol, protocols of the Internet protocol suite. It originated in the initial network implementation in which it complemented the Internet Protocol (IP). Therefore, th ...
(TCP) of the
Internet protocol suite The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suite are ...
, which provides a bidirectional bytestream. The
Internet media type In information and communications technology, a media type, content type or MIME type is a two-part identifier for file formats and content formats. Their purpose is comparable to filename extensions and uniform type identifiers, in that they ident ...
for an arbitrary bytestream is . Other media types are defined for bytestreams in well-known formats.


Flow control

Often the contents of a bytestream are dynamically created, such as the data from the keyboard and other peripherals (/dev/tty), data from the
pseudorandom number generator A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG), is an algorithm for generating a sequence of numbers whose properties approximate the properties of sequences of random number generation, random n ...
( /dev/urandom), etc. In those cases, when the destination of a bytestream (the consumer) uses bytes faster than they can be generated, the system uses process synchronization to make the destination wait until the next byte is available. When bytes are generated faster than the destination can use them and the producer is a software algorithm, the system pauses it with the same process synchronization techniques. When the producer supports flow control, the system only sends the ''ready'' signal when the consumer is ready for the next byte. When the producer can not be paused—a keyboard or some hardware that does not support flow control—the system typically attempts to temporarily store the data until the consumer is ready for it, typically using a queue. Often the receiver can empty the buffer before it gets completely full. A producer that continues to produce data faster than it can be consumed, even after the buffer is full, leads to unwanted buffer overflow,
packet loss Packet loss occurs when one or more packets of data travelling across a computer network fail to reach their destination. Packet loss is either caused by errors in data transmission, typically across wireless networks, or network congestion.Ku ...
, network congestion, and
denial of service In computing, a denial-of-service attack (DoS attack) is a cyberattack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host co ...
.


See also

*
Bit banging Bit banging is a term of art that describes a method of digital data transmission as using general-purpose input/output (GPIO) instead of computer hardware that is intended specifically for data communication. Controlling software is responsi ...
* Bit-stream access * Bitstream format * Byte-oriented protocol * MPEG elementary stream *
Reliable byte stream A reliable byte stream is a common service paradigm in computer networking; it refers to a byte stream in which the bytes which emerge from the communication channel at the recipient are exactly the same, and in exactly the same order, as they we ...
*
Stream (computing) In computer science, a stream is a sequence of potentially unlimited data elements made available over time. A stream can be thought of as items on a conveyor belt being processed one at a time rather than in large batches. Streams are processe ...
*
Stream processing In computer science, stream processing (also known as event stream processing, data stream processing, or distributed stream processing) is a programming paradigm which views Stream (computing), streams, or sequences of events in time, as the centr ...
*
Traffic flow (computer networking) In packet switching networks, traffic flow, packet flow or ''network flow'' is a sequence of packets from a source computer to a destination, which may be another host, a multicast group, or a broadcast domain. RFC 2722 defines traffic flow as " ...


References

{{Reflist Data transmission Reconfigurable computing