摘要
C语言数据类型丰富,而数据类型的确定在程序设计中又至关重要,有必要对各种类型的数据进行深入细致的研究。在Turbo C 2.0中,实型数据包括float型、double型和long double型三种,编码长度分别为4B、8B和10B,从左至右,第一位为数据的符号位,接下来为指数的偏码,位数分别为8b、11b和15b,剩余部分为尾数的编码。存储时以字节为单位将编码逆序存放。通过转换公式可以轻松地实现数值与编码之间的转换,在实验的基础上归纳出了实型数据的相关属性。
The C programming language has rich data types, it is of great importance to identify data types in program designing,so the intensive research of all types of data is necessary. In Turbo C 2.0, the real - type data includes float, double and long double types wity coding lengty of 4B,8B and 10B respectively, from left to right, the first bit is the symbol bit of data and the next is the partial index code with the length of 8b,llb and 15b respectively,the remaining part is the mantissa code. The code is stored in reverse order in the unit of byte. The conversion between value and coding can be easily achieved through transforming formula, the relevant attributes of real - type data is summed up on the base of experiments.
出处
《皖西学院学报》
2007年第5期19-21,共3页
Journal of West Anhui University
关键词
C语言
实型
编码
存储
C programming language
real type
coding
storage