Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 193 Bytes

README.md

File metadata and controls

3 lines (2 loc) · 193 Bytes

Exercise 2-7

Write a function invert(x, p, n) that returns x with the n bits that begin at position p inverted (i.e., 1 changed into 0 and vice versa), leaving the others unchanged.