专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅
起来看个练习实训:AX中16位数分为4组(1234分为1,2,3,4)每组4位分别放在AL,BL,CL,DL 答: datasegment dataends csegsegment assumecs:cseg,ds:data start: movax,1234h movcl,4 movdx,ax anddx,0fh movbx,ax shrbx,cl andbx,0fh movch,bl movbx,ax shrbx,cl shrbx,cl andbx,0fh shrax,cl shrax,cl shrax,cl andax,0fh movcl,ch andcx [阅读全文] [PDF]
格雷码是一个长度为2^n的序列,序列中无相同元素,且每个元素都是长度为n的二进制位串,相邻元素恰好只有1位不同。例如长度为2^3的格雷码为(000,001,011,010,110,111,101,100)。设计分治算法对任意的n值构造相应的格雷码。#include \"stdio.h\"void putsgray(int a[],int m){ int i; for(i=m;i>0;i--) printf(\"%d\",a[i]); printf(\"\\n\");}void gray(int n,int a[],int m){ if(n==1) { a [阅读全文] [PDF]
1 共2条 分1页