Thread: logic circuit truth table

  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, 05: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, 10:53 AM
  4. Programming a Truth Table
    By Nitelite in forum C Programming
    Replies: 2
    Last Post: 09-26-2002, 01:49 PM