Most frequently used bitwise operators.

Programming, for all ages and all languages.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Most frequently used bitwise operators.

Post by Combuster »

nobody actually does this
The thing about electronics is that ANDs and ORs (of any input width) can be implemented with just diodes (the resulting gate depends on the direction you use said diodes), and a NOT equates to a single transistor, thereby covering your primitive silicon components. NANDs and their kin have no such equivalence and are implemented as compositions of the other three parts.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Most frequently used bitwise operators.

Post by Brendan »

Hi
Love4Boobies wrote:No? I don't know where I got that from; I should take one of Coursera's courses on these matters. In that case, I don't know what the most common operation is when working with logic gates or whether one can be singled out.
I disagree. The single most frequently used bitwise operator is "unary is". Most people aren't aware of this bitwise operator, so here's the truth table:

Code: Select all

in | out
------
1  | 1
0  | 0
In software this operator is used for assignment (e.g. "x = y;" relies on "unary is"). In electronics, for every conductor (of non-zero length) there are an infinite number of "unary is" operators involved.

:roll:


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

Re: Most frequently used bitwise operators.

Post by Mikemk »

That makes sense, Brendan.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
User avatar
mnovotny
Member
Member
Posts: 27
Joined: Mon Aug 10, 2009 2:54 am
Location: Slovakia

Re: Most frequently used bitwise operators.

Post by mnovotny »

Combuster wrote:
nobody actually does this
The thing about electronics is that ANDs and ORs (of any input width) can be implemented with just diodes (the resulting gate depends on the direction you use said diodes), and a NOT equates to a single transistor, thereby covering your primitive silicon components. NANDs and their kin have no such equivalence and are implemented as compositions of the other three parts.
There are many ways to implement gates in electronics. The most popular method today is CMOS, where it takes two transistors to implement NOT for instance. DTL, while used, is not nearly as relevant.
Keep the world with all its sin
It's not fit for livin' in
phillid
Member
Member
Posts: 58
Joined: Mon Jan 31, 2011 6:07 pm

Re: Most frequently used bitwise operators.

Post by phillid »

Brendan wrote:In electronics, for every conductor (of non-zero length) there are an infinite number of "unary is" operators involved.
Hahaha, very nice, Brendan. Some smart donkey had to point it out ;)

Speaking of logic gates, my father has one of those Pong games that you plug into the TV. It's got two pots on it - one for each player's paddle. There's no software involved in it at all; it's entirely hard coded in a large series logic gates. Yep, back in the 70s and 80s, you could literally buy a 'Pong Chip' off the shelf at the local D ick Smith (damned profanity detector originally got rid of the d ick part) store (basically Radio Shack if you're in the US).

Maybe I should upgrade to CMOS and raise the clock speed on that baby! :P Perhaps I could then create another unit to act as the two players and keep the ball in play as long as possible..... hardcoded in logic gates of course :P
phillid - Newbie-ish operating system developer with a toy OS on the main burner
Post Reply