Multiplication problem

Thread Starter

Άρης Τσαλαπάτας

Joined Oct 26, 2017
3
hi all.so i am doing my thesis and my project is to make a circuit that gets values from registers compares them and if according to the values it is square it must find its area and show it in 7 segment display.everything is going great but i am stuck when it comes to finding the area, i know i should use multiplication my teacher told me to use bcd adder and shift registers but i have no idea how the connection would be.i mean the register would take the first 4bit binary number and then what ? how would it connect to the adder and then sent back the signal so it makes the second addition and then the third until it has the final product.thank you
 

WBahn

Joined Mar 31, 2012
30,058
This is for a "thesis"?

What kind of hardware is this that you are using? A micrcontroller? An FPGA? Discrete logic?

What does it mean to compare values from registers and for (according to the values it is square). Are these values in the register the width and length of a rectangle and you only need to find the area if the two values are the same (hence a square).

Are the values in the registers limited to 4-bit unsigned integers? How many bits in your result?

Walk through how YOU would take the values in the registers and compute the area.
 

Thread Starter

Άρης Τσαλαπάτας

Joined Oct 26, 2017
3
hi there first of all thank uyo for answering so fast.secondly in the circuit i take 4 values and i compare them and if they are all the same its a square or if two by two are the same its a rectangle.what i want to do is after i made the comparison and i know what shape it is i want to multiply those values so i get the area but i dont know how to do the multiplication in multisim.my teacher told me to use the shift left and add combo but i dont know how exactly does it work and what parts to use the values are all 4-bit.the circuit that i am building is this one(i will upload attachement.)the leds i have put its just to see if it works how i want.,,the multiplication is sup[posed to go after the comparison
 

WBahn

Joined Mar 31, 2012
30,058
What level of thesis is this? Is this a master's thesis? If so, in what degree? Is it a "thesis" for some undergraduate level course? If so, what one and what is your major? These help us shape our responses to better match your level and background.

If I gave you the 4-bit values 0101 and 1011 and asked you to multiply them by hand, how would you do it?

You might first consider something more familiar. If I gave you two 4-digit numbers 1234 and 3421 and asked you to multiply them by hand, how would you do it?
 

Thread Starter

Άρης Τσαλαπάτας

Joined Oct 26, 2017
3
ok so the thesis is for my bachelors degree in electrical engineering .i am not gonna lie when it comes to electronics and design my level is about medium,the way i would multiply them is the multiplicant with each one of the multipliers digits going(shifting)left. and then add the products to get the final products,thats the same thing i wanna do in my project using adder and shift registers
 

Attachments

WBahn

Joined Mar 31, 2012
30,058
So your handwork is enough to yield a nice, efficient algorithm. You start with a target register that is twice as wide as your operands (assuming each operand is the same size) and initialize it to zero. Then you go through N cycles where N is the number of bits in the operand. In each cycle you either add the first operand to the product register or not depending on the value of the right-most bit in the other operand. Then you shift the first operand left and the second operand to the right.
 
Top