Friday, April 3, 2020

Interview Question 41: Design a circuit to calculate square of a number

Create micro-architecture and write an RTL code for a design that calculates the square of a given number.

Caveat: It should not use any multiplier operation. It does not have to be done in one clock cycle.


1 comment:

Guy123abc said...

a^2 = a*a = Sum(a) (a times)
If we add a, a-times that should give the square of a.

For example: 5^2 = 5+5+5+5+5 (5 added 5 times)