摘要
在C语言程序设计教学过程中,根据Turbo C中整型数据类型在内存中的存储形式为补码的特点,巧妙引进补码的定义公式,灵活、简单地解决了初学者难以理解的整型数据取值范围的来源,有符号与无符号类型之间自动转换时输出真值的判定问题,以及在使用求反运算符时如何确定输出真值的问题.在实际教学过程中,通过引进补码的概念及其定义公式,使学生迅速领会了这些问题的本质.
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 constant to become simple.In practical teaching,it enabled students to quickly grasp the essential of these questions.
出处
《甘肃联合大学学报(自然科学版)》
2008年第S1期1-3,共3页
Journal of Gansu Lianhe University :Natural Sciences
关键词
C语言
程序设计
补码
位运算
C Language
Programming
Two's Complement
Bit Operation