Note that you have to follow the text carefully for the connections of the XOR gates or else you could end up with a very short cycle even with a large number of gates and shift registers. Here is a link for a typical writeup on these random number generators So the idea is to find the hardware connection you prefer (depending on how many 'gates' you want to use and the max speed) and then write out the logic statements, then program it into the uC chip or into memory of some kind. Unless of course you have a built in XOR logic function (shown by an 'x' here): Or in boolean logic (where '*' indicates logic AND and the apostrophe represents the NOT function): Or when we dont have the xor function available: Rem For inputs a and b and output c we have: The logic is pretty simple though because the XOR gate is not hard to write out in Boolean logic or even more simple computer code as i'll show with this small pseudo code block. If you have problems i'll do a search and see what i can find. I would have to look it up to determine the code but if you care to do this then go ahead and try first. The required connections for the logic gates can be found on the web. When the program is run, it simulates the logic gates and outputs a random number. The logic statements for these gates are then entered into the uC in the required code. Well, it starts with a hardware circuit using XOR gates.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |