博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Bits Bytes and Words
阅读量:4030 次
发布时间:2019-05-24

本文共 2711 字,大约阅读时间需要 9 分钟。

Bits, Bytes and Words

bit is a BInary digiT. So a bit is a zero or a one. Bits can be implemented in computer hardware using switches. If the switch is on then the bit is one and if the switch is off then the bit is zero. A bit is limited to representing two values. 

Since the alphabet contains more than two letters, a letter cannot be represented by a bit. A byte is a sequence of bits. Since the mid 1960's a byte has been 8 bits in length. 01000001 is an example of a byte. Since there are 8 bits in a byte there are 28 different possible sequences for one byte, ranging from 00000000 to 11111111. This means that a byte can be used to represent any type of value with no more than 28 = 256 possible values. Since the number of things that you can enter on a computer keyboard is smaller than 256 (including all keystoke pairs, like shift or control plus another key), a code for a keystoke is represented with a code within a byte.

Since characters (letters, decimal digits and special characters such as punctuation marks, etc) can be represented with bytes, a standard is needed to insure that the code that's used on your computer is the same as the code that is used on mine. There are two standard codes that use one byte to represent a character, ASCII (ass'-key) and EBCDIC (ib'-suh-dik). ASCII, the American Standard Code for Information Interchange, is the code that is most commonly used today. EBCDIC, Extended Binary Coded Decimal Interchange Code, was used by IBM on its large mainframe computers in the past. Wikipedia has more than you want to know about  and . Since these codes are limited to 256 possible combinations, certain character sets, such as Chinese, Arabic, Japanese, Klingon and others, cannot be represented using these codes. This problem is solved by using another code, Unicode, which uses 2 bytes for each character. This extension allows 216 different symbols to be represented, a total of 65,536. The use of Unicode gives more flexibility in the representation of data. The drawback of using Unicode is that it takes twice as much space to store the same number of characters.

word is the number of bits that are manipulated as a unit by the particular CPU of the computer. Today most CPUs have a word size of 32 or 64 bits. For example, the notebook computer that I bought in May 2008 contains a core 2 duo 64 bit processor. Data is fetched from memory to the processor in word size chunks and manipulated by the ALU in word size chunks. All other things being equal, (and they never are), larger word size implies faster and more flexible processing.

Further Information

Wikipedia contains exhaustive information about ,  and .

howSTUFFworks also has an article on )

转载地址:http://alhbi.baihongyu.com/

你可能感兴趣的文章
/dev/input/event0 键盘输入
查看>>
qt 创建异形窗体
查看>>
可重入函数与不可重入函数
查看>>
简单Linux C线程池
查看>>
内存池
查看>>
输入设备节点自动生成
查看>>
opencv test code-1
查看>>
eclipse 导入先前存在的项目
查看>>
GNU hello代码分析
查看>>
Qt继电器控制板代码
查看>>
busybox passwd修改密码
查看>>
wpa_supplicant控制脚本
查看>>
rfkill: WLAN hard blocked
查看>>
gstreamer相关工具集合
查看>>
arm 自动升级脚本
查看>>
RS232 四入四出模块控制代码
查看>>
gstreamer插件之 videotestsrc
查看>>
autoupdate script
查看>>
linux 驱动开发 头文件
查看>>
/etc/resolv.conf
查看>>