logic circuit truth table

This is a discussion on logic circuit truth table within the C Programming forums, part of the General Programming Boards category; i have to write a program that gives the truth table of the digital logic circuit(with only logic gates like ...

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    2

    Unhappy logic circuit truth table

    i have to write a program that gives the truth table of the digital logic circuit(with only logic gates like AND,OR,EXOR etc.)the circuit is user defined. i'm in trouble with defining the circuit which the user gives. for example maybe like pspice,but ı can not find any way...please help me,its urgent...

  2. #2
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    please help me,its urgent
    Isn't it always

    Given two conditions a and b:
    AND:
    Code:
    if ( a && b)
    Or:
    Code:
    if ( a || b )
    XOR:
    Code:
     if ( (a || b) && (a != b) )

  3. #3
    Registered User
    Join Date
    Nov 2004
    Posts
    2

    the problem is different

    the gates are ok,ı m in trouble with define the circuit,for example a circuit with 2 AND 3 OR gates,how to define that for example,the output of 1. AND is in the same node with the 1. input of 1. OR ,is it ok??

  4. #4
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    Code:
    if (homework && urgent && !postedcode)
    {
      delayPoster(indefinitely);
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 06:06 PM
  2. XOR truth table
    By swgh in forum C++ Programming
    Replies: 4
    Last Post: 02-08-2006, 10:12 AM
  3. program to construct a truth table
    By ashok varma in forum C Programming
    Replies: 2
    Last Post: 08-04-2005, 11:53 AM
  4. Programming a Truth Table
    By Nitelite in forum C Programming
    Replies: 2
    Last Post: 09-26-2002, 02:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21