Close

Results 1 to 8 of 8

Threaded View

  1. #8
    Banned eXOBeX's Avatar
    Join Date
    Oct 2011
    Location
    .
    Posts
    21
    Thanks
    5
    Thanked:        4
    Karma Level
    0

    Default Re: Theory of logic gates and how they work

    It's a tricky one to look at as one big "thing", it might help to break it into layers. "Top down design" is something I learned in college, and I suppose would sort of apply here as well (although we never had to design a circuit to print "hello world" on a screen, that's taking a BTEC computing course a bit far).

    You've got your high-level programming language that's doing all the "if this key is pressed, print this".

    That's been compiled into low-level machine code (assembly language) which will have a small set of commands that deal with things in much smaller steps. In this case wait until a key's pressed, grab the key code, print it (if it's printable) and wait for the key to be let go of before repeating the process:-
    Set data register 1 to address of start of display memory
    Rdkeystatus: Read data from keyboard status port into data register 2
    Compare data register 2 with xxx, where xxx has flags indicating key up, key down, etc. and jump to Rdkey if key down
    jump to Rdkeystatus
    rdkey: read data from keyboard data port into data register 2
    jump to WaitForLetGo if data register 2 less than 32 (in other words an unprintable character)
    copy data register 2 to address held in data register 1
    increment data register 1
    WaitForLetGo: Rdkeystatus: Read data from keyboard status port into data register 2
    Compare data register 2 with xxx, where xxx has flags indicating key up, key down, etc. and jump to WaitForLetGo if key down
    jump to Rdkeystatus
    That's very simplistic and doesn't deal with what happens when you run out of screen, but hopefully you get the picture.

    Now you get the nuts and bolts of these individual commands. If the processor receives an instruction code, depending on what the code is will depend on whether the processor needs to fetch the next one or two codes (containing the stuff it needs to work with, numbers to add for example) and what to do with it. That'll be microcode (Wikipedia has articles on it) that I know nothing about, that's what processor designers are for

    The next layer down from microcode will be the logic gates themselves, and below that the transistors that make up those gates.

    Thanks to eXOBeX

    grover2000 (5th December 2014) 


Social Networking Bookmarks

Social Networking Bookmarks
  • Submit to Digg Digg
  • Submit to del.icio.us del.icio.us
  • Submit to StumbleUpon StumbleUpon
  • Submit to Google Google
  • Submit to Facebook Facebook
  • Submit to My Yahoo! My Yahoo!
  • Submit to My Space My Space

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •