指出下面信号的最高位和最低位。reg [1:0] SEL
举一反三
- 1、指出下面几个信号的最高位和最低位reg[1:0] SEL; input[0:2] IP; wire[16:23] A;
- 下面哪种代码执行后是与其他结果不一样的? A: module mux2_1(a,b,sel,out); input a,b,sel; output out; assign out=(sel==1)?a:b; endmodule B: module mux2_1(a,b,sel,out); input a,b,sel; output out; reg out; always@(a or b or sel) begin case(sel) 0: out=a; 1: out=b; endcase end endmodule C: module mux2_1(a,b,sel,out); input a,b,sel; output out; reg out; always@(*) if(sel==0) out=a; else out=b; endmodule
- ls=[ [1,2,3,4],['a','b','c','d'],['列','表'] ][br][/br] 请写出结果: ls[0] (1) ls[0][0] (2) ls[1][0:2] (3)
- 下列 Python语句的程序运行结果为list1=[1,2,3];list2=[3,4,5];dict1={'1':list1,'2':list2};dict2=dict1.copy()dict1['1'][0]=15; print(dict1['1'][0]+dict2['1'][0])
- inta[ 2 ][ 3 ]={{1,2},{1}}; a[0][1]的值是 A: 2 B: 0