|
[精华集]《看雪论坛精华7》,2006年1月发布
顶............. |
|
常见问题(FAQ)[2008.2更新]
顶.................. |
|
|
|
汇编语言程序设计--笔记
1.2.4.4 用补码作减法例题2和例题3 附图: 使用补码将减法转换为加法操作 [X+Y]补=[X]补+[Y]补 [[X]补]补=X 没有更多例题提供,希望大家从多方面找寻例题,以学习汇编语言程序设计的重要课题--进制间的互换。 |
|
|
|
|
|
汇编语言程序设计--笔记
1.2.4 二进制运算 1.2.4.1 算术运算 1.2.4.2 十六进制算术运算 附图: 例题,如下图: 没有更多例题提供,希望大家从多方面找寻例题,以学习汇编语言程序设计的重要课题--进制间的互换。 |
|
汇编语言程序设计--笔记
原码、反码、补码总结附表。 如图: 补码的表数范围:-128----+127;0在补码里有+0、-0之分;在原码和反码里只有+0; 有符号数的补码: [X]补=X,if X >=0 [X]补=2^n-|X|, if X<0。n=8,16,32… 求负数的补码可使用取反加1 法或2^n减绝对值法。 没有更多例题提供,希望大家从多方面找寻例题,以学习汇编语言程序设计的重要课题--进制间的互换。 |
|
|
|
汇编语言程序设计--笔记
1.2.2.2 ASCII码 附图: (摘自96yx.com/tool/ASC2.htm ) 目前计算机中用得最广泛的字符集及其编码,是由美国国家标准局(ANSI)制 定的ASCII码(American Standard Code for Information Interchange,美国标 准信息交换码),它已被国际标准化组织(ISO)定为国际标准,称为ISO 646标 准。适用于所有拉丁文字字母,ASCII码有7位码和8位码两种形式。 因为1位二进制数可以表示(21=)2种状态:0、1;而2位二进制数可以表示 (22)=4种状态:00、01、10、11;依次类推,7位二进制数可以表示(27=)128 种状态,每种状态都唯一地编为一个7位的二进制码,对应一个字符(或控制码) ,这些码可以排列成一个十进制序号0~127。所以,7位ASCII码是用七位二进制 数进行编码的,可以表示128个字符。 第0~32号及第127号(共34个)是控制字符或通讯专用字符,如控制符:LF(换行 )、CR(回车)、FF(换页)、DEL(删除)、BEL(振铃)等; 通讯专用字符:SOH(文头)、EOT(文尾)、ACK(确认)等; 第33~126号(共94个)是字符,其中第48~57号为0~9十个阿拉伯数字;65~90号 为26个大写英文字母,97~122号为26个小写英文字母,其余为一些标点符号、运 算符号等。 注意:在计算机的存储单元中,一个ASCII码值占一个字节(8个二进制位),其最 高位(b7)用作奇偶校验位。所谓奇偶校验,是指在代码传送过程中用来检验是否 出现错误的一种方法,一般分奇校验和偶校验两种。奇校验规定:正确的代码一 个字节中1的个数必须是奇数,若非奇数,则在最高位b7添1;偶校验规定:正确 的代码一个字节中1的个数必须是偶数,若非偶数,则在最高位b7添1。 为了便于查询,以下列出ASCII码表: DEC(十进制) HEX(十六进制) CHAR(字符) CODE(控制码) C 程序(转义) 八进制 十六进制 十进制 字符 八进制 十六进制 十进制 字符 00 00 0 nul 100 40 64 @ 01 01 1 soh 101 41 65 A 02 02 2 stx 102 42 66 B 03 03 3 etx 103 43 67 C 04 04 4 eot 104 44 68 D 05 05 5 enq 105 45 69 E 06 06 6 ack 106 46 70 F 07 07 7 bel 107 47 71 G 10 08 8 bs 110 48 72 H 11 09 9 ht 111 49 73 I 12 0a 10 nl 112 4a 74 J 13 0b 11 vt 113 4b 75 K 14 0c 12 ff 114 4c 76 L 15 0d 13 er 115 4d 77 M 16 0e 14 so 116 4e 78 N 17 0f 15 si 117 4f 79 O 20 10 16 dle 120 50 80 P 21 11 17 dc1 121 51 81 Q 22 12 18 dc2 122 52 82 R 23 13 19 dc3 123 53 83 S 24 14 20 dc4 124 54 84 T 25 15 21 nak 125 55 85 U 26 16 22 syn 126 56 86 V 27 17 23 etb 127 57 87 W 30 18 24 can 130 58 88 X 31 19 25 em 131 59 89 Y 32 1a 26 sub 132 5a 90 Z 33 1b 27 esc 133 5b 91 [ 34 1c 28 fs 134 5c 92 \ 35 1d 29 gs 135 5d 93 ] 36 1e 30 re 136 5e 94 ^ 37 1f 31 us 137 5f 95 _ 40 20 32 sp 140 60 96 , 41 21 33 ! 141 61 97 a 42 22 34 " 142 62 98 b 43 23 35 # 143 63 99 c 44 24 36 $ 144 64 100 d 45 25 37 % 145 65 101 e 46 26 38 & 146 66 102 f 47 27 39 ` 147 67 103 g 50 28 40 ( 150 68 104 h 51 29 41 ) 151 69 105 i 52 2a 42 * 152 6a 106 j 53 2b 43 + 153 6b 107 k 54 2c 44 , 154 6c 108 l 55 2d 45 - 155 6d 109 m 56 2e 46 . 156 6e 110 n 57 2f 47 / 157 6f 111 o 60 30 48 0 160 70 112 p 61 31 49 1 161 71 113 q 62 32 50 2 162 72 114 r 63 33 51 3 163 73 115 s 64 34 52 4 164 74 116 t 65 35 53 5 165 75 117 u 66 36 54 6 166 76 118 v 67 37 55 7 167 77 119 w 70 38 56 8 170 78 120 x 71 39 57 9 171 79 121 y 72 3a 58 : 172 7a 122 z 73 3b 59 ; 173 7b 123 { 74 3c 60 < 174 7c 124 | 75 3d 61 = 175 7d 125 } 76 3e 62 > 176 7e 126 ~ 77 3f 63 ? 177 7f 127 del 希望大家从多方面找寻,以学习汇编语言程序设计的重要课题--进制间的互换。 |
|
汇编语言程序设计--笔记
1.2.2 编码 1.2.2.1 BCD码 附图: 1.2.2.1 BCD码 附 十进制BCD码表,如下图: 另附 十进制BCD码例题 图,如下: 没有更多例题提供,希望大家从多方面找寻例题,以学习汇编语言程序设计的重要课题--进制间的互换。 |
|
|
|
|
|
汇编语言程序设计--笔记
1.2.1.3.3.1 十进制数转换二进制数 附图: 没有更多例题提供,希望大家从多方面找寻例题,以学习汇编语言程序设计的重要课题--进制间的互换。 例题疑问: 3的除2的商为1,1再除2商为0,此时已没有余数。求45D的二进制数,也是这样。再多的例子也是这样的结果,为何“0”右边对应的是“1”呢。 45D的例题: 45 商 余数 22 1 11 0 5 1 2 1 1 0 0 “1” 最后排列:45D=101101B |
|
|
|
汇编语言程序设计--笔记
1.2.1.2 基数和权 1.2.1.3 计数规则 1.2.1.3.1 二进制数 1.2.1.3.2 十六进制数 (包括1.2.1.3.2.1二进制1.2.1.3.2.2 十六进制1.2.1.3.2.3十进制) 附图两张: 感叹“数学”在此时的重要性了和曾经的我没好好学习数学基础(一碰数字和公式,脑子就不转圈了) (作者:未知 来源:未知 摘自酷酷精品外挂) ******进制转换******* 对于玩修改的人来说,进制转换是不可不懂的。 电脑上的常用进制有:2、8、10、16四种,在修改中经常接触的是2、10和16进制,基本上需要了解的是2和16互转、10和16互转,其他多了解也没亏 2转16: 4个2进制位为一个16进制数,2进制1111为16进制F,2进制中千位的1=8,百位的1=4,十位的1=2,个位的1=1,将各个位的数作相应转换再相加,的到的数就是10进制数0-15,可轻松转换成16进制。如01011100,可看成是两组2进制数0101和1100,则这个数就是16进制的5C。 10转16: 100以内一点的10转16心算比较快,复杂的用“计算器”算了。10转16用传统的计算方式可以了,就是大于15小于256的10进制数除以16为的值为十位的16进制数,其余数为个位的16进制数,没余数则个位为0。如61的16进制是3D,61除以16得3余13,3作十位数,13转成D为各位数。 16转10: 用相反的道理,将十位数乘以16加上个位数。如5A,将5乘以16得80,加上A的10进制10,结果是90。 最直接方便的方法是用windows或win95中的计算器,打开计算器,将计算器置成科学型(win95的乘法),选中十进制选择钮,输入十进制数然后选择二进制选择钮,OK!又快又准确。可是如果你想成为一个合格的程序员的话,你就必须充分了解十进制数和二进制数的特点,最好的方法是你多做一些进制转换的题目,这是程序员训练中的传统做法。 三、以十六进制作桥梁 十进制到二进制的转换实在麻烦,而且二进制数实在不易记忆和理解,你能马上感觉到一万元是多少钱,但是你能感觉到10011100010000(二进制)是多少吗?为了编程和使用方便,在二进制和十进制之间有了一座桥梁十六进制。十六进制是逢十六进一,0、1、2、3、4、5、…9、A、B、C、D、E、F、10、11、12……。到了9以后用ABCDEF表示,十六进制数与二进制数的转换非常方便。 首先你应当牢记下表 二进制 十六进制 0 0 1 1 10 2 11 3 100 4 101 5 110 6 111 7 1000 8 1001 9 1010 A 1011 B 1100 C 1101 D 1110 E 1111 F 二进制数转换成十六进制数方法如下,以二进制数1101110为例: 将二进制数从右面开始以四位为一组分组,最左面不够四位的补0,按上表查得对应的十六进制数,组合起来以后就成了。 0110 1110的十六进制数是6E 十六进制转换成二进制方法如下,以十六进制数3E为例: 将十六进制的每一位转换成四位二进制数,不足四位的在左面补0,组合起来即可得到二进制数。 3E的二进制数是00111110,既是111110 当然你也可以用计算器得出结果。但也建议你熟练掌握。 也许热爱改游戏的你已经猜到,这就是你在改游戏的时候为什么总是与2A、3B、4C、5D、EF等奇怪数字打交道的原因了。它们表示的十六进制数。 怎么样够烦人的吧?我也曾经这样认为,为了进一步更好更快地掌握学习游戏编程,你必须了解这些进制转换。 |
|
汇编语言程序设计--笔记
1.2.1 数制 数制涉及的三个问题,附 1.2.1数制 图 二进制、八进制、十进制、十六进制等等,还有更多的进制数符集。是否学习掌握了其中的一种,就可以理解或掌握了以后演变而来的更多进制数符集? 参考资料:大学教材<计算机文化基础> 位,字节,bit,二进制位的意思和关系? "位"是表示"数权值"(权位),即我门在十进制中说的"个位","十位"一样.基数"R"是随着使用的进制变化而变化,在二进制中R=2、在十进制中R=10、在K进制里R=K。 一。权位: 1整数部分的权位容易容易理解。(权位从右向左0、1、2到K) 2.小数部分,以小数点为起点由左向右(权位依次是0、1、2到K);以小数点为起点由左向右(权为依次-1、-2到-K)。 3.有符号部分,+(正)数当做整数部分依次从右向左展开权位。-(负)数依次从左向右展开(-1、-2到-K)。 二。举例展开权位: 表示形式:数字xR的D次方.D等于该数字所在位的数权值. 1)整数部分:例如,二进制数{11101}B或{-11101}b : 分析:(R=2)、(D=权位)、(这里打不出 数的次方) 1xR[的D次方]+1xR[的D次方]+1R[的D次方]+0xR[的D次方]+1xR[的D次方],即1x2[的4次方]+1x2[的3次方]+1x2[的2次方]+0x2[的1次方]+1x2[的0次方]=16+8+4+0+1={11101}B 字节是计算机中存储的最小单位,一个字节(Byte)是一个8位的二进制,所以说一个字节为8位即8bit. 比特(Bit)是数据的最小单位,但在计算机中数据的存储却是一字节(8Bit)来存储的. ASCII表(美国标准信息交换表)中对字符的编号是一个8位的2进制,所以在计算机中用1个字节来表示1个英文字母.而在汉字中,表示一个汉字需要16位的2进制数,所以存储一个汉字要2字节. |
|
|
|
汇编语言程序设计--笔记
1.1.3.4 汇编语言程序设计的意义 4。汇编语言程序设计的意义: 1)与硬件密切相关,是学习硬件类课程的先行课和基础课。 2)有利于理解计算机的工作原理。 3)可直接而有效地控制硬件。 4)执行效率高,占用空间小。 5)特殊应用只能使用汇编语言,如 加密解密等。 应该指出的是:在计算机速度大大提高和存储器容量大大曾加的今天,高级语言的使用更为广泛和普遍(特别是编写大型程序)。 特殊应用使用汇编语言,如 加密、解密、逆向工程、有害代码的调试等等 图片略省,以后补充。 |
|
汇编语言程序设计--笔记
1.1.3.3 高级语言 机器语言和汇编语言以外的程序设计语言统称高级语言。其特点是更加接近自然语言和惯用的数学表达形式,与计算机硬件结构无关,因而便于使用,便于交流和推广。 总之,高级语言编程效率高,但运行效率低。 高级语言可分成编译型和解释型高级语言,分别使用编译程序和解释程序将源程序翻译成机器语言程序,然后交计算机执行。 图片略省,以后补充。 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值