Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:34:40+00:00 2026-06-03T13:34:40+00:00

does anybody know what are for PG and GG variables here: module sum(S, Cout,PG,GG,A,B,Cin);

  • 0

does anybody know what are for PG and GG variables here:

module sum(S, Cout,PG,GG,A,B,Cin);

wire [3:0] G,P,C;

output [3:0] S;
output Cout,PG,GG;
input [3:0] A,B;
input Cin;

assign G = A & B;
assign P = A ^ B; 
assign C[0] = Cin;
assign C[1] = G[0] | (P[0] & C[0]);
assign C[2] = G[1] | (P[1] & G[0]) | (P[1] & P[0] & C[0]);
assign C[3] = G[2] | (P[2] & G[1]) | (P[2] & P[1] & G[0]) | (P[2] & P[1] & P[0] & C[0]);
assign Cout = G[3] | (P[3] & G[2]) | (P[3] & P[2] & G[1]) | (P[3] & P[2] & P[1] & G[0]) |(P[3] & P[2] & P[1] & P[0] & C[0]);

 assign S[0] = P[0] ^ C[0];
assign S[1] = P[1] ^ C[1];
assign S[2] = P[2] ^ C[2];
assign S[3] = P[3] ^ C[3];
endmodule
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:34:41+00:00Added an answer on June 3, 2026 at 1:34 pm

    Your code is a four-bit carry-lookahead adder unit. PG and GG can be Group Propagate and Group Generate. PG and GG can be given to another CLA adder unit to combine such units to form a higher bit adder. They are given as

    assign PG = P[3] & P[2] & P[1] & P[0];

    assign GG = G[3] | P[3] & G[2] | P[3] & P[2] | G[1] | P[3] & P[2] & P[1] & G[0];

    More details here. http://en.wikipedia.org/wiki/Lookahead_Carry_Unit#16-bit_adder

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anybody know an PHP IDE that features a tool to encapsulate private variables,
Does anybody know of or have a detailed list of how the BCL in
Does anybody know, how to get a list of leaf nodes in Prolog? Let's
Does anybody know of a free flash obfuscator(protector)? All I can find are commercial
Does anybody know whether one exists? I've been googling this for monthes... Thanks
Does anybody know if you can access the SaevFileDialog control that's used by the
Does anybody know what is the equivalent to $? in Windows command line? Is
Does anybody know if there is a way to display the text value of
Does anybody know some nice documentation about the ruby handsoap gem to get me
does anybody know when the columns are generated of a GridView? After what event?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.