Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void decimalToBinary (int numberBits, int decimal, int[] &binary){
- for(int i = 0; i < numberBits; i++){
- binary[i] = (decimal >> i) & 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement