- #1
vysero
- 134
- 0
Homework Statement
I want to know how to insert a 2's complement number into a larger register and keep the same value. I would like to know of some pitfalls that I might run into using a generalized method, if any.
Homework Equations
The Attempt at a Solution
If I have say 1 in a 3 bit binary system, 001 and I take the 2's complement of the number I will get 111 or -1 in a 3 bit binary system. Let's say I want to put that number: 111, into an 8 bit register. Can I simple pad the number with leading zeros: 00000111?