什么是字和字节之间的区别? [英] What's the difference between a word and byte?

查看:172
本文介绍了什么是字和字节之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做了一些研究。
一个字节是8位和字是,可以在存储器寻址的最小单位。一个字的确切长度变化。我不明白的是什么是有一个字节的地步?为什么不说8位?

I've done some research. A byte is 8 bits and a word is the smallest unit that can be addressed on memory. The exact length of a word varies. What I don't understand is what's the point of having a byte? Why not say 8 bits?

我问一个教授这个问题,他说,大多数机器,这些天是字节寻址,但什么会,使一个词吗?

I asked a prof this question and he said most machines these days are byte-addressable, but what would that make a word?

推荐答案

字节:今天,一个字节几乎总是8位。然而,并非总是如此并没有标准或者一些规定这一点。由于8位是一个方便的数字与它成为事实上的标准工作。

Byte: Today, a byte is almost always 8 bit. However, that wasn't always the case and there's no "standard" or something that dictates this. Since 8 bits is a convenient number to work with it became the de facto standard.

:借助自然大小与一个处理器处理数据(寄存器的大小)。今天所遇到的最常见的字长是8,16,32和64位,但其它大小也是可能的。举例来说,有几个 36位机器的,甚至的12位机器的。

Word: The natural size with which a processor is handling data (the register size). The most common word sizes encountered today are 8, 16, 32 and 64 bits, but other sizes are possible. For examples, there were a few 36 bit machines, or even 12 bit machines.

字节是一个CPU的最小可寻址单元。如果你想设置/清除单位,首先需要从内存中取相应的字节,惹位,然后写字节回内存。

The byte is the smallest addressable unit for a CPU. If you want to set/clear single bits, you first need to fetch the corresponding byte from memory, mess with the bits and then write the byte back to memory.

相反是与处理器可以做的处理(如加法和减法)一次位的最大份额。这定义有点模糊,因为有些处理器可能有不同的任务,不同的字长(整数与浮点处理为例)。字的大小是操作的大多数的工作着。

The word by contrast is biggest chunk of bits with which a processor can do processing (like addition and subtraction) at a time. That definition is a bit fuzzy, as some processor might have different word sizes for different tasks (integer vs. floating point processing for example). The word size is what the majority of operations work with.

有也谁有几个处理器不同的指针的尺寸:例如,8086是一个16位处理器,这意味着它的寄存器为16位宽。但它的指针(地址)是20位宽的,并通过两个16位寄存器以一定的方式相结合,计算

There are also a few processors who have a different pointer size: for example, the 8086 is a 16-bit processor which means its registers are 16 bit wide. But its pointers (addresses) are 20 bit wide and were calculated by combining two 16 bit registers in a certain way.

这篇关于什么是字和字节之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆