DES Implementation - Plaintext Formatting issue.

Hey! So i've made alot of progress with my DES Implementation, but i've hit a little bit of a snag. The algorithm requires that you work with the binary digits of it, which wasn't apparant to me until I tried to perform substitution with the s boxes and found out that i was using the outer two bits and the inner four bits. So after some updating (massive changing) I have got it working with binary bits. The only issue I have at the moment, is after I XOR the binary bits with the current Key, I'm not ending up with a 6 bit output. I'm effectively just XORing 1 with some value in the key, and I get the sinking feeling that isn't correct. Can anyone help me with this issue.

In more concise terms, I just want to work out why im not getting a 6 bit output when I should be. IF you have any questions, and Im sure you will, please don't hesitate to ask and I will do my best to answer.

PS: This isn't for a homework project, but I really wouldn't like the answer just given to me. I've never seen that done on this forum, but I just want to be clear I want to figure this one out for myself, I think I just need a nudge in the right direction. Thanks!

Re: DES Implementation - Plaintext Formatting issue.

Quote:

why im not getting a 6 bit output

Please explain your algorithm and post the code that is creating the bits, show the output and explain what the output should be.

The bit operators don't create extra bits, they can be used to change the values of bits.