Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Byte
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
== Common uses == Many [[programming language]]s define the [[data type]] ''byte''. The [[C (programming language)|C]] and [[C++]] programming languages define ''byte'' as an "addressable unit of data storage large enough to hold any member of the basic character set of the execution environment" (clause 3.6 of the C standard). The C standard requires that the integral data type ''[[signedness|unsigned]] char'' must hold at least 256 different values, and is represented by at least eight bits (clause 5.2.4.2.1). Various implementations of C and C++ reserve 8, 9, 16, 32, or 36 bits for the storage of a byte.<ref name="Cline_Bytes" /><ref name="Klein_2008" />{{efn|The actual number of bits in a particular implementation is documented as <code>CHAR_BIT</code> as implemented in the file [[limits.h]].}} In addition, the C and C++ standards require that there be no gaps between two bytes. This means every bit in memory is part of a byte.<ref name="Cline_FAQ" /> [[Java (programming language)|Java's]] primitive data type ''byte'' is defined as eight bits. It is a signed data type, holding values from β128 to 127. [[.NET]] programming languages, such as [[C Sharp (programming language)|C#]], define ''byte'' as an unsigned type, and the ''sbyte'' as a signed data type, holding values from 0 to 255, and [[two's complement|β128 to 127]], respectively. In data transmission systems, the byte is used as a contiguous sequence of bits in a serial data stream, representing the smallest distinguished unit of data. For [[asynchronous communication]] a full transmission unit usually additionally includes a start bit, 1 or 2 stop bits, and possibly a [[parity bit]], and thus its size may vary from seven to twelve bits for five to eight bits of actual data.<ref name="NWU" /> For [[synchronous communication]] the error checking usually uses bytes at the end of a [[Frame (networking)|frame]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Byte
(section)
Add topic