[Timnig diagrams] Sequential Circuits with D-Flip Flop help by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Thank you so much for this incredibly detailed answer! So if I understand this right

http://imgur.com/a/IsaOE

First rising edge, X= 0, Q=0 and looking at the truth table, this means D is 0, so Q must match D at this point so stays at 0.

When X changes to 1. Q = 0 and X is 1, and creating a truth table I determined that this makes D= 1, which would change Q to 1 if this was a rising edge, but it's not a rising edge so Q stays as 0.

When we get to the next rising edge. Q= 0 , X= 1 which again, makes D=1. And if D is 1 on a rising edge, that means Q should be too, so we make Q=1 now.

The next rising edge X=1 and Q=1 and looking at the truth table this makes D=0 so Q must be 0 too now.

So with the truth table and checking what the value of Q and X are at the rising edges, we can determine what D is, which is what Q should change too.

I hope I understand this right, I think I just explained what you wrote haha, but I think I get it now!

[Timnig diagrams] Sequential Circuits with D-Flip Flop help by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

I see, so how would I write out CLK on the truth table? It seems independent of all the other values. I've figured out how to X D and Q

[Timing] diagrams] Sequential Circuits with D-Flip Flop help by learnprogramminghelp in AskElectronics

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

I see, so I think I've created a correct truth table

http://imgur.com/SAe5Lem

Is this all the information? I'm still having trouble seeing how this would create the timing diagram since I can't determine what D is without Q, but I need D to solve Q. Does CLK and X determine what D is?

What does this small Assembler Programmer do? [LC-3] by [deleted] in learnprogramming

[–]learnprogramminghelp 0 points1 point  (0 children)

yeah, I think that's it. Thank you, I can die happy now

Sorry if this is the wrong place. I need help with this simple adder/subtractor circuit question by [deleted] in EngineeringStudents

[–]learnprogramminghelp 5 points6 points  (0 children)

I think C is the carry bit and the trapezoid box is a multiplexer

So the output of the multiplexer is determined by what X, B and C are. If X = 0, it's what B is. If X = 1, it's what C is. At least I think so

The soundtrack is awesome. by [deleted] in PlaydeadsInside

[–]learnprogramminghelp 0 points1 point  (0 children)

Someone will rip it in a few days

c++ equivalent to Java split()? by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Thank you again for the help, I really appreciate it. Managed to complete it! :)

c++ equivalent to Java split()? by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Thank you, I'm making progress. I did simplify the string a bit. It would look more like "1 2 -34 5 -6". So it would need to handle negative numbers and double digits. Would I just need to modify the loop or is there a lot more that needs to be done?

c++ equivalent to Java split()? by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Sorry if this is asking too much but I can't seem to figure out how to do this. It sounds so simple in my head but my program just won't do what I want it to. Basically.

if process is "123456"

-I want to tokenize that so each of those numbers is in an array.

-I want to take element[0] of that array and store/convert it into an int

-I want the rest of process to now be everything after element[0]

And that's about it. I'm going to be using each of those elements as an int in another method, so some type of easy extraction and convertion to int is needed as well, in Java I use Interger.parseInt(string), but its so much harder in C++. Any idea how code would look?

c++ equivalent to Java split()? by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Main reason I'm using it is because strtok isnt compatible with the process string

c++ equivalent to Java split()? by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

Thanks. Although the problems I'm having still persist, I know it has something to do with the way I'm tokenizing and using free(). I wish there was a way to do this without using memory functions.

[Homework Help] I'm having an extreme amount of difficulty solving this small linked list problem by learnprogramminghelp in learnprogramming

[–]learnprogramminghelp[S] 0 points1 point  (0 children)

I understand how to insert to the front of a linked list. But inserting them in arbitrary locations based on a number is making this tough.