Continue to Site

Welcome to EDAboard.com

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.

[SOLVED] modular adder vhdl code

Status
Not open for further replies.

mamarezax

Newbie level 1
Joined
Jun 27, 2007
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,288
i need vhdl code of a modular adder.
for example an adder that calculated with following method

a and b are n-bit
m is n bit number.
m= 2^n-1
s is n bit number.
(a+b)mod m =s
solve this for n=4
example:
a= 1101
b=1001
m=1111
s=0110

our design must be have only on n bit adder (4 bit adder for example)
many thanx my friends
 

(a+b)mod m =s
solve this for n=4
example:
a= 1101
b=1001
m=1111
s=0110

Something is wrong with the example:

a=1101 = 13
b=1001 = 9
m=1111 = 15
s=0110 = 6

(a+b) mod m = (13+9) mod 15 = 22 mod 15 = 7
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top