Interchange 2 nibbles of byte

S

Sreejith K

How to interchange the two nibbles of a byte without
using any bitwise operator.
 
L

Lasse Skyum

unsigned char a;
a = a * 16 + a/16;

But why would you want to do that?? What kind of system doesn't have bitwise
operators?
 
M

Megan

unsigned char a;
a = a * 16 + a/16;

But why would you want to do that?? What kind of system doesn't have bitwise
operators?

Can you say homework assignment?
M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top