题解 | #奇偶校验#

奇偶校验

https://www.nowcoder.com/practice/67d4dd382bb44c559a1d0a023857a7a6

`timescale 1ns/1ns
module odd_sel(
input [31:0] bus,
input sel,
output check
);
//*************code***********//
    wire is_odd, is_even;
    assign is_odd = ^bus;
    assign check = (sel == 1'b1) ? is_odd : ~is_odd;

//*************code***********//
endmodule

全部评论

相关推荐

牛牛不会牛泪:脉脉太多这种了,纯水军
点赞 评论 收藏
分享
10-17 13:54
上海大学 运营
雾凇岛:这还说什么了,冲了兄弟们
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务