(num)
| 73 | |
| 74 | |
| 75 | def dec2bin(num): |
| 76 | res = bin(num).replace("0b", "") |
| 77 | if(len(res) % 4 != 0): |
| 78 | div = len(res) / 4 |
| 79 | div = int(div) |
| 80 | counter = (4 * (div + 1)) - len(res) |
| 81 | for i in range(0, counter): |
| 82 | res = '0' + res |
| 83 | return res |
| 84 | |
| 85 | # Permute function to rearrange the bits |
| 86 |