首页 | 本学科首页   官方微博 | 高级检索  
     

C语言程序设计中关于补码的几个问题的探讨
引用本文:向万里,王智勇. C语言程序设计中关于补码的几个问题的探讨[J]. 甘肃联合大学学报(自然科学版), 2008, 0(Z1)
作者姓名:向万里  王智勇
作者单位:兰州交通大学交通运输学院;吉首大学师范学院教务处;
摘    要:在C语言程序设计教学过程中,根据Turbo C中整型数据类型在内存中的存储形式为补码的特点,巧妙引进补码的定义公式,灵活、简单地解决了初学者难以理解的整型数据取值范围的来源,有符号与无符号类型之间自动转换时输出真值的判定问题,以及在使用求反运算符时如何确定输出真值的问题.在实际教学过程中,通过引进补码的概念及其定义公式,使学生迅速领会了这些问题的本质.

关 键 词:C语言  程序设计  补码  位运算  

Research on Several Questions of Two's Complement in C Language Programming
XIANG Wan-li ,WANG Zhi-yong. Research on Several Questions of Two's Complement in C Language Programming[J]. Journal of Gansu Lianhe University :Natural Sciences, 2008, 0(Z1)
Authors:XIANG Wan-li   WANG Zhi-yong
Affiliation:XIANG Wan-li 1,WANG Zhi-yong 2 (1.School of Traffic & Transportation,Lanzhou Jiaotong University,Lanzhou 730070,China,2.Office of Teaching Affaires,Normal College of Jishou University,Jishou 416000,China)
Abstract:During the course of teaching C Language Programming,formula of definition of two's complement was introduced according to the character that data type integer of Turbo C was stored in the form of two's complement in memory.Thus,beginners was able to grasp the essential of the range of data type integer.And the technique enabled solving the transition between data type signed and data type unsigned to become simple.On the other hand,it enabled searching the result of one's complement of a variable or a cons...
Keywords:C Language  Programming  Two's Complement  Bit Operation  
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号