Thread: Higher level ALU simluation

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    33

    Higher level ALU simluation

    I understand that ALU's are implemented in machine language, commonly verilog and VHDL. But is there a good source of an ALU written in a higher language such as c, c++, or even java? I would like to make a gui to show gate level schematics but would like to build off existing logic if possible. I would prefer 4 bit or 32 bit, but I can easily modify if others exist!

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    > but I can easily modify if others exist!
    How much modification?

    This needs more than average
    Code:
    int main ( ) {
        simulateALU();
        return 0;
    }
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Feb 2010
    Posts
    33
    haha good one. :-)

    i was hoping to do a bit less on it than that though!

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,662
    Your friend at the same school perhaps?
    simple ALU
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Diablo's random level generation
    By glo in forum Game Programming
    Replies: 7
    Last Post: 07-19-2008, 03:04 AM
  2. Listing binary tree numbers by level
    By Nazgulled in forum C Programming
    Replies: 5
    Last Post: 06-16-2008, 10:36 AM
  3. The problem with higher level math
    By Thantos in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 12-20-2004, 07:53 AM
  4. Higher level book
    By CheesyMoo in forum C++ Programming
    Replies: 9
    Last Post: 05-01-2003, 07:29 PM
  5. "lower level language"...??
    By matheo917 in forum C++ Programming
    Replies: 3
    Last Post: 04-12-2002, 03:52 PM