Serial 2 S Complementer Shift Register

  • 14 Comments!

First look at the operation of the D type flip flop The sequence starts by a reset so Q = 0 The input to the D-type is made up from the initial output (Q) which is OR'd with the first (LSB) bit of the number you are complimenting (X). The output Y is XOR'd with Q and X (00 > 0, 01 >1) as Q is '0' we don't have to consider any other case. So initially the output at Y will always be the same as input at X i.e our LSB data bit. The initial input at 'D' will also be the same as the input at X (X OR '0' = X) Let's take a number - say 28. In binary this would be 00011100 To change this to its 2's compliment we invert and add 1 00011100 --> 11100011 ---> +1 ----> 11100100 So if our circuit works a 00011100 input it will produce a 11100100 output Start with a reset so that Y = X (Q = '0') Q (t+1) = D (t) D is X OR Q Y is X XOR Q LSB first X Q D Y 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 Look at the diagonal relationship between D and Q. Q in the next row (t+1) is simply the value of D in the previous row (at time t). Each time the bit is CLOCKED 't' moves on 1.

Let's inspect what possibilities we can get when trying to get the 2's complement of a bit string. In the initial state you could get a 1 whose 1's complement is 0 and with a carry in hand equals to 1.

The rest is simply applying the logic of the connected gates to produce a value.

Thanks for your kind reply See I have followed you and understood your line 39 to 51 is printable characters. In my case I have attached 74HC165 TO GET PARALLEL DISPLAY DATA FROM AN INSTRUMENT TO CONVERT IT INTO SERIAL AND THEREAFTER SERIAL DATA INPUT TO ARDUINO FOR DISPLAYING THE OBJECT OF THE INSTRUMENT INTO THE DISPLAY OF ARDUINO.

Serial 2 S Complementer Shift Register

AND THERE IS MY PROBLEM IN SPTE OF GETTING THE “INSTRUMENTAL DISPLAY OBJECT” i AM GETTING THE “011000” VALUE ACCORDING TO YOURS. WOULD YOU PLEASE BE ABLE TO GUIDE ME TO CONVERT THIS “011000” DATA TO ACTUAL DISPLAYING OBJECT? THANKS FOR YOUR INFORMATION: THE ACTUAL DISPLAY OF THIS INSTRUMENT HAS BEEN DISCONTINUED AND THEREFORE i WANT TO TAKE THE DISPLAY DATA OF THE INSTRUMENT INTO ARDUINO THROUGH ON ITS LCD. Download doraemon hindi. From my understanding, you have the buttons well connected to the shift register and the output of shift register is also connected to the Arduino. If you are using the same display (16×2 HD44780 LCD), then the code above should have worked for you. If you are using other display, you may need to change to code for the display.

Another thing that you can try is, first make sure you read what is exactly send from the shift register. Change the code to display it using your serial monitor. From there, if you able to read the correct input from your buttons, then its just the display code you need to work on. Hope this helps.