专业英语2

 

Data Types

  Binary information in digital computers is stored in memory or processor registers.Registers contain either data or control information .Control information is a bit or a group of bits used to specify the sequence of command signals needed for manipulation of the data in other registers. Data are numbers and other binary-code information that are operated on to achieve required computational results. Now we present the most common types of data found in digital computers and show how the various data types are represented in binary-code form in computer registers.

l         Numeric data can often be represented as integers .Inunsignde integers ,an n-bit value can range from 0 to 2n-1 .An n-bit signed integer can have any value between -2n-1 and 2n-1-1,inclusive .Both formats can be used in arithmetic algorithms.Some numeric date cannot be represented as integers .These values, which typically include fractional portions,are represented in floating point format in computers. A computer may have special registers and instructions exclusively for floating point data.

l         The Boolean values TRUE and FALSE are used often enough to warrant having their own data type ,Boolean ,and assembly language instructions. Typically ,a data value is set to zero to represent FALSE and any nonzero value for TRUE. Boolean assembly language instructions can perform logical operations on these values. Unlike logical instructions ,which generate one result per bit of the operands, Boolean instructions generate only one result. To illustrate the difference ,consider the case in which A=0000 0010 and B=0000 0001 .The logical AND of these binary values produces the result 0000 0000. However ,if they are Boolean values ,A and B are both TRUE,since they are both nonzero .Their Boolean AND must produce a result of TRUE ,represented by a nonzero value.

l         Computers must also deal with character data. The characters are stored as binary values encoded using ASCII, EBCDIC, UNICODE, or some other character encoding standards .Rather than arithmetically or logically manipulating characters,a computer may concatenate strings of characters ,replace some characters with others,,or therwise manipulate character strings .Some assembly language instruction sets include instructions to directly maniplate character data. Others use routines constructed from other instructions to achieve the same result.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值