Previous in Forum: CCD REPAIR   Next in Forum: Design Project Incorporating a GPS
Close
Close
Close
25 comments
Rate Comments: Nested
Participant

Join Date: Jan 2010
Posts: 2

Reducing the Number of Logic Gates

01/11/2010 5:24 AM

I am doing my final year project, but in my design i suppose to use many logic gates which are going to be expensive and add some complexity in designing.

I want to reduce number of logic gates in my circuit by replacing them by another electronic device, and which is suitable device? please any one who can help.

Thanks.

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#1

Re: How to reduce number of logic gates by replacing them by another single device?

01/11/2010 5:27 AM
__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Score 1 for Good Answer
Guru
United Kingdom - Member - Indeterminate Engineering Fields - Control Engineering - New Member

Join Date: Jan 2007
Location: In the bothy, 7 chains down the line from Dodman's Lane level crossing, in the nation formerly known as Great Britain. Kettle's on.
Posts: 32175
Good Answers: 839
#2

Re: How to reduce number of logic gates by replacing them by another single device?

01/11/2010 5:34 AM

http://cr4.globalspec.com/thread/45769/Why-You-Shouldn-t-List-Your-Email-Address

Plus, it denies other readers a learning opportunity.

__________________
"Did you get my e-mail?" - "The biggest problem in communication is the illusion that it has taken place" - George Bernard Shaw, 1856
Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#3

Re: How to reduce number of logic gates by replacing them by another single device?

01/11/2010 5:38 AM

As JohnDG says, or sometimes a small microcontroller will do the job with more versatility.
Recently I did a circuit where two level switches 'low' and 'empty' controlled three leds green amber and red. This simple circuit was repeated 3 times on the board. I looked at the options, and in the end I used a micro controller, it may seem to be overkill but it is very useful as customers always want variations and additions, like audible alarms which can be muted and outputs to building management systems etc. The micro controller provides all this.
Of course a micro isn't suitable for all applictions.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply Score 1 for Good Answer
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15600
Good Answers: 981
#4

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 10:25 AM

Occasionally I get the urge to "nit pick" an argument. Most of the time I can control this but not this time. I apologize to everyone who posted very practical answers that probably answer what the OP meant by asking this question.

But you cannot reduce the number of logic gates in a system by adding a microcontroller or programmable gate array. The thousands of gates that each of these components contain will quickly overwhelm any saving in the number of gates used in another component. The only way to actually reduce the number of gates used in a state logic machine is to apply Boolean logic optimization or simplification rules.

Now let me explain why I'm picking this nit. The OP may have a requirement for some high reliability concern (MTBF, fail safe). where he has to switch to a higher grade, more expensive logic package architecture if the number of gates exceeds a certain number. Distributing logic function to other components can violate the reliability analysis for the system.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#5
In reply to #4

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 11:53 AM

Ok, it's a fair cop but did the OP really say what he meant...?

They generally don't ...unless the OP is me of course.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply
Guru
Popular Science - Weaponology - New Member United Kingdom - Member - New Member

Join Date: May 2007
Location: Harlow England
Posts: 16512
Good Answers: 670
#6
In reply to #4

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 1:08 PM

Actually I'm going to nit pick too and say in the example I gave the microcontroller does replace all the logic gates and arguably the microcontroller contains no discrete user accessible.
The 'logic' is implemented in software.
Del

__________________
health warning: These posts may contain traces of nut.
Register to Reply Off Topic (Score 5)
Guru
Engineering Fields - Electrical Engineering - Been there, done that. Engineering Fields - Control Engineering - New Member

Join Date: Dec 2008
Location: Long Island NY
Posts: 15600
Good Answers: 981
#7
In reply to #6

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 2:13 PM

Sorry but every aspect of a microcontroller is realized by logic gates. A memory bit is fundamentally a flip flop collection of two gates, the organized sequencing of execution is controlled by a shift register or counter that is crafted by many logic gates. People forget that all digital circuitry is composed solely of AND, NAND, OR, NOR, NOT gates glued together by tri-state gates. They are all part of one monolithic chip and the user cannot directly access them. But they are there none the less.

There will be less calculations required for hardware reliability estimates for one will have only one component to consider. But failure modes will become unpredictable.

__________________
"Don't disturb my circles." translation of Archimedes last words
Register to Reply Off Topic (Score 5)
Anonymous Poster
#8
In reply to #7

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 2:24 PM

The Apollo computer that brought man to the moon was built entirely of NOR gates.

Designed at MIT and constructed by Raytheon here in MA.

Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#18
In reply to #7

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/12/2010 7:02 AM

I read his "Logic Gates" as also meaning "number of chips" or "size of PCB"!

So you are nit picking completely wrongly here, sorry!!!!

Happy 2010 to all our "Nits" (and everyone else a s well of course!)

regards

Chief Nit

PS PICAXEs start at a few $$$ each......ONLY. Dead cheap.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Anonymous Poster
#9
In reply to #4

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/11/2010 6:02 PM

<Yawn>

Register to Reply Off Topic (Score 5)
Guru

Join Date: May 2007
Location: Budapest, Hungary, HA5YAR
Posts: 617
Good Answers: 14
#13
In reply to #4

Re: How to Reduce Number of Logic Gates by Replacing Them by Another Single Device?

01/12/2010 12:27 AM

I think Del is right. If you want to define the task exactly it's not "decrease the number of logical gates" but "decrease the number of component". Less components means lower cost, smaller footprint, higher reliability. In addition microcontrollers give you incredible flexibility - without the need of a soldering iron...

__________________
Aged man is not old man...
Register to Reply Off Topic (Score 5)
Power-User

Join Date: May 2008
Posts: 306
Good Answers: 12
#10

Re: Reducing the Number of Logic Gates

01/11/2010 10:48 PM

A number of years ago (10+) we had a product that had numerous IC's that were only logic gates. I was asked to redesign the board to do away with the physical logic gates. I chose to use a PLD (Programmable Logic Device). The logic gates were reduced by using the engineering reduction methods and then implemented as 'software'. There were some other minor clocking tricks to learn, but the product is still being produced today. There are a few manufacturers out there but i used [insert disclaimer here] Xilinx. You can download the programing software for free (At least it used to be) and tinker around the manuals.

Best of luck.

Register to Reply
Power-User
Ireland - Member - New Member Engineering Fields - Energy Engineering - New Member

Join Date: Aug 2007
Location: Northern Ireland
Posts: 197
Good Answers: 17
#11

Re: Reducing the Number of Logic Gates

01/11/2010 10:55 PM

Your answer is to use a PIC.

http://en.wikipedia.org/wiki/PIC_microcontroller

I buy these in job lots. I haven't used discrete gates in years, and used to use PLAs (as Del suggests). The PIC is a specific type of PLA but even simpler. Many was the hour spent p**sing about with an oscilloscope trying to find the gate that wasn't firing or latching or whatever. I would no more build a discrete gate array than build an astable with transistors instead of a 555.

In fact I'll go further than Del, and say if it can't be done with a PLA or PIC then it can't be done at all.

__________________
I love deadlines; I love the whooshing sound they make as they pass by. - Douglas Adams
Register to Reply
Power-User

Join Date: Jul 2009
Location: Montreal, Canada
Posts: 284
Good Answers: 18
#12

Re: Reducing the Number of Logic Gates

01/11/2010 11:22 PM

z

__________________
Do unto others. Then run.
Register to Reply Score 1 for Off Topic
Guru
Australia - Member - New Member Fans of Old Computers - H316 - New Member Hobbies - Model Rocketry - New Member

Join Date: Jun 2006
Location: Port Noarlunga, South Australia, AUSTRALIA (South of Adelaide)
Posts: 3048
Good Answers: 75
#14

Re: Reducing the Number of Logic Gates

01/12/2010 12:27 AM

Ok, settle down girls and boys.

Redfred is correct in that the correct way of going about reducing the number of logic steps or gates is to utilize Boolean algebra and simplify the equation. Mind you, that assumes that they bothered to teach you about Boolean algebra wherever it is you are studying.

An interesting example of somebody not simplifying a circuit was a Binary Coded Decimal interface for a computer control system in a building that needed to indicate which level a lift had stopped on. Each level gave a closure of a discrete set of contacts which then had to be encoded into BCD for the computer to understand.

However the design engineer hadn't bothered to look at which levels the lift stopped on which turned out to be Levels 1, 2, 4 and 8. So when his box of overly complex and fragile electronics failed after approximately 30 seconds of operation I replaced it with four bits of wire. The simple answer, 1, 2, 4 and 8 are already BCD values so no circuitry was required.

However, in the real world where cost, time, availability and expediency are the prime driving factors the answer has to be use a microcontroller and do the rest with software.

Which solution you choose is up to you and in your case what you lecturer expects is a major factor.

If you are going for reliability then reducing the number of components is critical, but that also may involve utilizing a microcontroller which if correctly selected may be the only component you need. In your case you could more than likely use one of PIC's PICkit microcontroller demonstrator boards that cost as little as US$30.00 to do everything, but I'm not sure your lecturer would accept this since you wouldn't be doing any circuit design yourself.

If I were designing something for myself then it's a no brainer and the microcontroller is the only way to go.

__________________
An elephant is a mouse built to government specifications.
Register to Reply Score 1 for Good Answer
Power-User
Ireland - Member - New Member Engineering Fields - Energy Engineering - New Member

Join Date: Aug 2007
Location: Northern Ireland
Posts: 197
Good Answers: 17
#15
In reply to #14

Re: Reducing the Number of Logic Gates

01/12/2010 1:44 AM

Ah someone who can type more than one letter. Most useful.

Excellent point Masu didn't look at the educational standpoint. So in my view you show your lecturer both designs, and emphasise how you rationalised the final layout.

Worthy to note that smaller component counts improve reliability in manufacturing. Sourcing components can be a problem especially if a large order goes astray or proves to be faulty. Thus even a more expensive solution can be more cost effective in the long run. Not to mention smaller PCB sizes, lower solder volumes etc etc.

__________________
I love deadlines; I love the whooshing sound they make as they pass by. - Douglas Adams
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#16

Re: Reducing the Number of Logic Gates

01/12/2010 3:38 AM

Agree with the comments about a PIC (or similar) being the easiest/most flexible etc., assuming it can meet whatever speed requirements there may be in the application. Sometimes you just can't get around combinatorial logic, and IMHO a PLA is the simplest way to reduce the component count.

Without knowing more about the application, we can't really call it.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#17

Re: Reducing the Number of Logic Gates

01/12/2010 6:57 AM

PIC chips can do wonders in this area......its what I will be using soon. Its easy to write a program to perform the logic functions needed.

If the application does not need very fast logic then look for PICAXE chips which are PICs with a "built in" Basic interpreter. All the software needed is also free to download......therefore very cheap to start with. You need a PC to program the chips over a serial port connection.

Check this website out:-

http://www.rev-ed.co.uk/picaxe/

Have fun!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Active Contributor

Join Date: Mar 2009
Location: Alberta
Posts: 18
#19

Re: Reducing the Number of Logic Gates

01/12/2010 9:36 AM

Use an FPGA.

__________________
-- The Jackal
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#20
In reply to #19

Re: Reducing the Number of Logic Gates

01/12/2010 10:19 AM

A PLA by any other name ...

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply Off Topic (Score 5)
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#21
In reply to #19

Re: Reducing the Number of Logic Gates

01/12/2010 10:32 AM

I know as good as nothing about FPGAs (or PALs!), can you tell us just how much you need to invest to allow design/programming etc..?

I know its programmable logic and the good ones can be even programmed to work as a microcomputer, but thats about it!!

Can you point us to websites that cater for the Hobbyist/poor student/Scotsmen?

Thanks in advance.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#22
In reply to #21

Re: Reducing the Number of Logic Gates

01/12/2010 10:55 AM

You can get a "feel" for it by looking at eg the Lattice site. There're generally programmed with just about any PROM programmer (may need adapters for SMT packages etc). See eg Dataman.

You'd be looking at ~£300 for a programmer, & the parts are generally in the 50p - £5 range.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#23
In reply to #22

Re: Reducing the Number of Logic Gates

01/12/2010 4:01 PM

Many thanks but I feel that may well be out of the reach of poor students and Scotsmen, especially as there would appear to be a need for some sort of "compiler" that probably costs more on top......

I am going to get going on PICAXEs next year for a couple of jobs I have waiting.

If you already have the PC or Laptop with either a serial or USB port, you can get going for less that $50 with a PCB for testing, all the components needed and the serial cable (or a USB to serial cable), all the software and software simulator and still have change!!!

They are more than fast enough for many jobs, but nowhere near as fast as a PIC without loader or a FPGA of course.

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#24
In reply to #23

Re: Reducing the Number of Logic Gates

01/12/2010 6:19 PM

"... that may well be out of the reach of poor students ..."

Surely any college-type place teaching such a subject would have a device programmer somewhere?

"... there would appear to be a need for some sort of "compiler" that probably costs more on top..."

A bit of searching should find you enough free downloadable software (I haven't used PALs/GALs/PLAs etc. for a few years, but I'm certain I've never paid a penny for software - I used to download lots of such tools, over a dial-up connection).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Popular Science - Weaponology - New Member Safety - ESD - New Member Hobbies - Fishing - New Member

Join Date: Sep 2006
Location: Near Frankfurt am Main, Germany. 50.390866N, 8.884827E
Posts: 17996
Good Answers: 200
#25
In reply to #24

Re: Reducing the Number of Logic Gates

01/13/2010 7:32 AM

You could well be more than just right.

I have got PICAXE on the brain as they are many times faster than what I ever (up to now anyway) need for my ideas.....AND although students may have access to a programmer, you and I both know that there is nothing better than having your own, there to hand.....

Many years ago, while working to keep the family fed and studying at the OU, I had to use the Uni's computer, but the only terminals were at the study center, 10 miles from my house. What with overtime etc., it was getting difficult to keep up so I bought a terminal with a 300 baud acoustic coupler so I could do my homework from ANYWHERE.....expensive at nearly 2000 pounds sterling in 1976 or 7! But it was the only way.....In 1979 I built my first home computer and was able to use it online to the OU via a phone line, again at 300 Baud. The Telecom would not have liked it, but it worked!!!

I still feel the same way (Scot's Blood?) and I have already got all the PICAXE software downloaded (for nothing as its all free) from the PICAXE site and will be ordering the hardware in the near future....just to experiment with a few ideas I have. I will not need to spend as I said, even $50, including postage......

...and if I really needed to save money even more, I could do it even cheaper by buying empty PICs and loading them with the free Basic boot loader from "Kicchip" (I believe thats the right name), though you do need access to a PIC programmer (Kits from $20) to load the Basic loader just once into each chip....Once its in, a programmer is no longer required as the chip will accept serial downloading from a PC.

Look here if you or anyone is interested:

http://www.kicchip.co.uk/

Thats my personal take on a cheap an economical way to program and use microchips.... I am fairly sure that this is also possibly the cheapest method with full software, emulators and software support, but open to be corrected on that point!!

__________________
"What others say about you reveals more about them, than it does you." Anon.
Register to Reply
Register to Reply 25 comments

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

Andy Germany (5); Anonymous Poster (2); BabyGuinness (2); daffy (1); DreadZontar (1); JohnDG (5); masu (1); PWSlack (1); Qqberci (1); redfred (2); The Jackal (1); user-deleted-1105 (3)

Previous in Forum: CCD REPAIR   Next in Forum: Design Project Incorporating a GPS

Advertisement