数据库系统集合查询训练
查询只选修了‘信息系统’和‘数学’这两门课程的学生的基本信息
select student.*
from student
where sno in(
select sno
from sc
where cno=(
select cno
from course
where cname='信息系统') )
intersect
select student.*
from student
where sno in(
select sno
from sc
where cno=(
select cno
from course
where cname='数学') )
except
select student.*
from student
where sno in(
select sno
from sc
where cno in(
select cno
from course
where cname<>'信息系统' and cname<>'数学') );
查询既选修了‘数学’又选修了‘信息系统’的学生
select student.*
from student
where sno in(
select a.sno
from sc a,sc b
where a.cno in(
select cno
from course
where cname='数学') and b.cno in(
select cno
from course
where cname='信息系统') and a.sno=b.sno);
超前进位加法器信息收集及理解:
目前在所有的cpu中,为了提高加法的计算速度。都采用了超前进位加法器。
超前进位集成4位加法器74LS283
由于串行进位加法器的速度受到进位信号的限制,人们又设计了一种多位数超前进位加法逻辑电路,使每位的进位只由加数和被加数决定,而与低位的进位无关。现在介绍超前进位的概念。
由全加器的真值表可得Si和Ci的逻辑表达式:
定义两个中间变量Gi和Pi:
当Ai=Bi=1时,Gi=1,由Ci的表达式可得Ci=1,即产生进位,所以Gi称为产生量变 。若Pi=1,则Ai·Bi=0,Ci=Ci-1,即Pi=1时,低位的进位能传送到高位的进位输出端,故Pi称为传输变量,这两个变量都与进位信号无关。
将Gi和Pi代入Si和Ci得:
进而可得各位进位信号的罗辑表达如下: