Understanding the Sklansky Adder Algorithm

In summary, the Sklansky adder works by computing the G and P values for each pair of bits, then using those values to calculate the carry and sum values for each pair, until the final sum is obtained.
  • #1
Narkon
1
0
Hello. I am unsure if this subforum is the right place for this question, but without any alternatives, I will dare to post it here.

A few days ago I received an assignment which is about the creation in VHDL of a Sklansky adder. However, before I move to the coding part, I have trouble understanding the exact mechanics of the algorithm. Below you can see a pi is a picture I have found which shows the tree of a 16-bit Sklansky adder. I have already found the circuits that are represented by the black and grey boxes and I know that the triangles are just buffers.

Assuming we add the 16-bit A and B, I know that I have to find the generate and propagate values for each pair of bits A(i) and B(i) which are produced from the following equations
9bdb79f15f95e3e4cd4af7239b31fcc4.png
and
f5c0d5b45f53aae418e02be45891af1f.png

I also know that at some point I will have to calculate carry values with the equation:
2b427196f75af6c666f71efe13dd24d3.png


but I can't find a detailed explanation about how all that ties together. I don't know which are the steps that take place after I get to the final "level" in the picture, which is depicted by the bottom most box (the one with the numbering 0:0, ... 15:0), and the professor who assign this has been less than helpful so far with cryptic explanations and confusing clarifications. I have no idea what happens after I am through with the black/grey components and the buffers. If someone can help me understand the basics and the flow of the algorithm, I will be grateful, even if it's only a link that offers the explanation I seek. Thank youhttp://i1140.photobucket.com/albums/n575/artdevil27/2015-12-12_183428_zpsvkvhsjvq.png?t=1449862983
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
The Sklansky adder is a type of ripple-carry adder. This means that each carry bit is generated by the previous carry bit and the two inputs being added. The way the Sklansky adder works is that it computes the generate (G) and propagate (P) values for each pair of bits, A(i) and B(i). The G and P values are used to compute the carry (C) values for each pair of bits, which are then used to compute the sum (S) values for each pair of bits. The G and P values are calculated using the following equations:G = A(i) & B(i)P = A(i) | B(i)The C values are then calculated using the following equation:C = C(i-1) + G + PFinally, the S values are calculated using the equation:S = A(i) ^ B(i) ^ C(i-1)To illustrate, let's take a look at the 16 bit Sklansky adder in the image you provided. Each triangle represents a buffer, which is basically a device that stores the value of the carry bit from the previous stage. The boxes with numbers represent the G, P, C, and S values for each bit. For example, the first box in the top row has the labels 0:G, 0:P, 1:C, and 0:S. This means that for the first bit (bit 0), the G and P values are calculated using the equation above, and the C value is taken from the buffer (which stores the carry bit from the previous stage). Finally, the S value is calculated using the equation above. The same process is repeated for each pair of bits, until the final sum is calculated.
 

1. What is the Sklansky adder algorithm?

The Sklansky adder algorithm is a method for adding binary numbers in a more efficient and parallel manner. It was developed by computer scientist Jack Sklansky in 1960.

2. How does the Sklansky adder algorithm work?

The algorithm works by breaking down the addition process into smaller and simpler steps. It uses a tree-like structure to perform the addition in parallel, reducing the number of steps needed compared to traditional addition methods.

3. What are the advantages of using the Sklansky adder algorithm?

One major advantage is its efficiency, as it can perform additions in parallel and with fewer steps. This is especially useful in digital circuits where speed and efficiency are crucial. Additionally, the algorithm is easily scalable and can handle larger numbers with minimal changes.

4. Are there any drawbacks to using the Sklansky adder algorithm?

While the algorithm is efficient, it may require more complex circuitry to implement compared to traditional addition methods. This can make it more challenging to design and may require more resources.

5. In what applications is the Sklansky adder algorithm commonly used?

The Sklansky adder algorithm is commonly used in digital signal processing, cryptography, and other applications where fast and efficient addition of binary numbers is necessary. It is also used in hardware design for processors and other electronic devices.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
6
Views
17K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
19K
  • Programming and Computer Science
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Programming and Computer Science
Replies
1
Views
956
  • Engineering and Comp Sci Homework Help
Replies
17
Views
5K
  • Quantum Physics
Replies
1
Views
813
Back
Top