Skip to content

Instantly share code, notes, and snippets.

Created Feb 5, 2016

What would you like to do?
Created using soleditor: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
contract ReadConvertUint256Bytes {
function equal(uint a) constant returns (bool) {
uint x = 0;
for (uint i = 0; i < 32; i++) {
uint b = uint([35 - i]);
x += b * 256**i;
return a == x;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.