Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Bitstream
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Sequence of binary digits}} {{for|the more theoretical concept in computer science|Stream (computer science)}} {{for|data streams|Data stream}} {{other uses}} {{more citations needed|date=December 2016}} A '''bitstream''' (or '''bit stream'''), also known as '''binary sequence''', is a [[sequence]] of [[bit]]s. A '''bytestream''' is a sequence of [[byte]]s. Typically, each byte is an [[Octet (computing)|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]]) so there is no unique and direct translation between bytestreams and bitstreams. Bitstreams and bytestreams are used extensively in [[telecommunications]] and [[computing]]. For example, [[synchronous]] bitstreams are carried by [[SONET]], and [[Transmission Control Protocol]] transports an [[Asynchronous communication|asynchronous]] 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 [[frame synchronization|framing]] and [[error correction]] together with its data.{{citation needed|date=June 2018}} ==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 [[programmable read-only memory|PROM]] or [[flash memory]] 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]], [[Ehrenfeucht–Mycielski sequence]], [[Fibonacci word]], [[Kolakoski sequence]], [[regular paperfolding sequence]], [[Rudin–Shapiro sequence]], and [[Thue–Morse sequence]]. On most [[operating systems]], including [[Unix-like]] and [[Windows]], standard I/O libraries convert lower-level paged or buffered [[file access]] to a bytestream paradigm. In particular, in Unix-like operating systems, each process has three [[standard streams]], which are examples of unidirectional bytestreams. The [[Pipeline (Unix)|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 programming language|low-level languages]], some [[High-level programming language|high-level languages]] such as Python<ref>{{cite web |url=https://pypi.python.org/pypi/bitstream |title=Bitstream |publisher=Python Software Foundation |url-status=live |archive-url=https://web.archive.org/web/20160908204954/https://pypi.python.org/pypi/bitstream |archive-date=2016-09-08 |df=ymd}}</ref> and Java<ref>{{cite web |url=https://docs.oracle.com/javase/8/docs/api/java/util/BitSet.html |title=Class BitSet |publisher=Oracle |url-status=live |archive-url=https://web.archive.org/web/20161130021926/http://docs.oracle.com/javase/8/docs/api/java/util/BitSet.html |archive-date=2016-11-30 |df=ymd}}</ref> offer native interfaces for bitstream I/O. One well-known example of a [[communication protocol]] which provides a byte-stream service to its clients is the [[Transmission Control Protocol]] (TCP) of the [[Internet protocol suite]], which provides a bidirectional bytestream. The [[Internet media type]] for an arbitrary bytestream is {{mono|application/octet-stream}}. Other media types are defined for bytestreams in well-known formats.<!--[[User:Kvng/RTH]]--> ==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]] ([[/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 (data)|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 (abstract data type)|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]], [[network congestion]], and [[denial of service]]. ==See also== {{div col|colwidth=20em}} * [[Bit banging]] * [[Bit-stream access]] * [[Bitstream format]] * [[Byte-oriented protocol]] * [[MPEG elementary stream]] * [[Reliable byte stream]] * [[Stream (computing)]] * [[Stream processing]] * [[Traffic flow (computer networking)]] {{div col end}} ==References== {{Reflist}} [[Category:Data transmission]] [[Category:Binary sequences| ]] [[Category:Reconfigurable computing]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite web
(
edit
)
Template:Div col
(
edit
)
Template:Div col end
(
edit
)
Template:For
(
edit
)
Template:Mono
(
edit
)
Template:More citations needed
(
edit
)
Template:Other uses
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)