Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
What do you mean by bitwise sum? Do u want top mean the LSB of the' resut of summatio'n? The reason I ask this because the binary sum will have sum and carry and the sum can be a binary value whose decimal equivalence is more than 1.
I think the meaning of "bitwise sum" is obvious from the code. The only point, that may need explanation is the used bitwidth in calculating assign sum = in + in ...
It can be derived from Verilog Rules for expression bit lengths. This is a case of context-determined expression, where the maximum bitlength of left hand and right hand side of the expression is used. Thus all possible carries are considered correctly.