I admittedly haven't been here before, haven't even been to this site but I was lingked here from /g/ so... I was wondering if you could give me a hand with something. I'm a first year computer science student (I know I know there's no jobs and it's a waste of time and whatever) and I was looking through some past papers when I came across a question that has me a little perplexed.
The question asked how I would go about building a denary full adder using these logic gates in order (XNOR,NOR,NOT,NAND). Now logic gates and all that related shit are my arch nemesis but I have no fucking clue how this would even work. Is this somethign that's trivially simple and I'm just being dense or is this as puzzling as it seems?
Sorry if these kind of questions are taboo or whatever, I wasn't willing to lurk for a few months before asking.
Name:
Anonymous2011-08-21 16:41
Alright faggot, let's have it.
I'm a first year computer science student (I know I know there's no jobs and it's a waste of time and whatever)
Wrong. There aren't any jobs for clueless uninterested faggots like you.
logic gates and all that related shit are my arch nemesis but I have no fucking clue how this would even work
The wikipedia articles on them are trivial. Get a pencil and paper and don't come out until you can write out the truth table for (((A & B) | !(C & !D)) & (A | D)). Are you about to begin 1st year in CS or have you just finished it in April? If it's the latter, I have bad news for you -- either you really suck at this or your university sucks shit.
Sorry if these kind of questions are taboo or whatever
No questions are taboo, but stupid questions that can be solved via a bit of reading are frowned upon. First show us that you're putting some effort into it and maybe we'll answer.
Name:
Anonymous2011-08-21 16:49
Oh wow, harsh. Okay.
Right, basic truth tables I can understand. It's more the more complicated circuit diagram stuff which I'm a little fuzzy on. I exaggerated when I said it was my nemesis.
What really confuses me is how you can make a full adder with denary, I understand how you do it with binary well enough but I just can't seem to wrap my head around how it would work in base 10.
>I know I know there's no jobs and it's a waste of time and whatever
Is this true?
I was thinking of studying CS to get out of NEETdom but if there's no jobs it's just a waste of time.
I know I know there's no jobs and it's a waste of time and whatever
Is this true?
I was thinking of studying CS to get out of NEETdom but if there's no jobs it's just a waste of time.
First you have to consider how (naive) adders work. Let x0 be the first digit of the first number, y0 be the first digit of the second number, c0 be the first carry (which can take values 0 or 1), r0 be the first digit of output, and B the base in which you're working in.
Then r0 ≡ x0 + y0 (mod B). That's easy for the first digit. But what if x0+y0>B? We need to take that into account, and so if x0+y0>B then c0=1, otherwise c0=0.
Now let's move on to the next digit. It's the same thing, except now we have to take into account the carry from the previous digit. Therefore, r1 ≡ x1 + y1 + c0 (mod B). As before, if x1 + y1 + c0 > B, then c1=1, otherwise c1=0. This is the general case of the adder. It's important to understand this. It is a function to which you give three inputs, i.e. your two digits and whether the previous adder produced a carry, and produces two outputs, i.e. the resulting digit and whether this addition produced a carry.
Adding multi-digit numbers is simply a matter of chaining together all these adders.
Now let's look at the problem of implementing a base-10 adder using logic (binary) gates.
A base-10 digit takes 3.32 bits, so you need 4 bits to fit one.
Your adder function thereby takes a 4+4+1=9 bit input (first_digit,second_digit,prev_carry), and produces a 4+1 bit output (out_digit,carry).
Thank you for the help but I feel that I'm missing something fundamental here, whilst I understand the theory I don't understand... oh god this is so fucking hard to word.
I understand how it works with binary because it's all single bits, 1 is true and 0 is false. Is there something I'm missing or would this just involve a lot full adders connected together?
Sorry about this, computer systems/architecture was the module I was least competant at and as such I'm currently trying to improve on it.
>>12
Read my post until you understand it completely (especially the last part).
Let's say you want to write, as described in my post, an adder function (...) [that takes] a 4+4+1=9 bit input (first_digit,second_digit,prev_carry), and produces a 4+1 bit output (out_digit,carry).
Any digit between 0 and 9 inclusively can be represented as a 4-bit number (assuming you know how binary works). Valid "digits" are therefore 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001. Now you add together the two input digits (which is each 4-bit wide), along with the carry from the previous adder. The result r is a 5-bit number between 0 and 19. Now, if the r < 10 then you can just output (result_digit=r,carry=0). However, if r ≥ 10, you must compute r-10 -- this is actually equivalent to computing r+22, ignoring overflow/carry (because 22 is http://en.wikipedia.org/wiki/Two%27s_complement of 10). Then you can output (result_digit=r+22,carry=1).
If you still don't get it, I'll make a diagram. But I really recommend using a program like LogiSim or MMLogic to play around with logic gates.
If you still don't get it, I'll make a diagram.
No, I think a better idea is that if he still doesn't get it he goes back to wherever he came from and you learn how to correctly sage threads.
...Did i spell LSFR wrong? LFSR rolls off the tounge better
tsss what were they thinking... LSFR...
Name:
n3n7i2011-08-22 23:42
Is it not supposed to be linear? That seems pretty useless....
Mine is waaaay better =D
(Making up for all the times i havent?[pressed the ......]) ? =)
>>We should also consider the question of state inversion in ternary systems (as well as 4-state systems and so on). In a binary system, inversion is trivial - not 0 is 1, not 1 is 0. In three-value logic, inversion (!) is not necessarily as simple as claimed above. The inversion of 0 can be either 1 or 2. Inversions are often most useful when they are reversible, so that if !0 = 2, then !2 = 0. This leaves 1 to invert to itself. Another approach, however, has !0=1, !1=2, and !2=0 - this is invertible but not reversible, as !(!0) = 2, not 0. There are 6 reversible ternary inverters (including the identity).
>>is invertible but not reversible,
=) Left-handed // Right-handed Op's? ...Reversed enough>?>
if (!)0=2 (i)2=0
I did a basic ternary LSFR loop on paper though =)
Name:
Anonymous2011-08-23 12:13
>>38
The details of the inside would be nice. I'm still confused as to how this works from a circuitry standpoint.
Do you use a regular full adder 4 times, effectively adding the denary numbers together? How do I make it so that it knows that the number is above 9... like... if...
A and B and C and D
A and B and !C and D
A and !B and C and D
Are all the combinations that I think can give you a binary number equivalent to >9 so would I have to wire it so that those states result in a carry. Also what if what I get results in a carry of greater than 1? Like 1111 + 1111?
Looking back this shit is a hundred times more complicated than anything we were taught or I'm just not understanding something.
A digital comparator shouldn't be very hard to implement. You start with the digit in the most significant position. If the digits of both numbers in that position are equal, you move on to the next one; otherwise, you're done because you can say which one is larger. Your homework is to apply that to make a 4-bit comparator (it's even easier since you're comparing against a constant).
Also, if r=x+y+c where 0≤x≤9 and 0≤y≤9 and 0≤c≤1, then 0≤r≤19.
Name:
Anonymous2011-08-23 23:04
<DOUBLES!
Name:
Anonymous2011-08-23 23:59
data:image/svg+xml
What the fuck. Could you be any more perverse?
>>56
You could just not be a dick about it, you know. On the other hand, what program are you using? Inkscape isn't very appropriate for this kind of job.
Name:
Anonymous2011-08-24 19:16
>>62 http://www.capilano.com/dww_overview
Yeah, proprietary software, and it sometimes crashes, but I haven't found anything quite as easy to use and portable from the FOSS community (no, I will NOT install 300MB of shitty bloated libraries just to use your 2MB app.)
>>64,65
Ah, finally finding out what that program was called after so many years brings a nostalgic tear to my eye, like seeing an old friend -- MMLogic was what pushed me into electronics and programming back when I was six or seven years old. Fuck, I loved it.
Name:
Anonymous2013-09-01 14:08
English version drops tonight. Are you ready?
Name:
Anonymous2013-09-01 15:39
Time enough has passed for a moebeetus thread. heart-stopping images abound. Lay it on thick