How to arrange the data of two 8-bits in to a single 16-bit in C?

I have two 8-bit data,

1st 8-bit= {DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0}

2nd 8-bit= {DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0}

I wanted to merge these two data in to a single 16-bit data, as per the below arrangement,

Expected result = {DB7 DA7 DB6 DA6 DB5 DA5 DB4 DA4 DB3 DA3 DB2 DA2 DB1
DA1 DB0 DA0}.

Is there any straight forward logic/method to achieve this in C?


Download how.to.arrange.the.data.of.two.8.bits.in.to.a.single.16.bit.in.c.zip
Direct Link


Download


Download how.to.arrange.the.data.of.two.8.bits.in.to.a.single.16.bit.in.c.zip
Mediafire


Download


Download how.to.arrange.the.data.of.two.8.bits.in.to.a.single.16.bit.in.c.zip
FileJungle


Download


Download how.to.arrange.the.data.of.two.8.bits.in.to.a.single.16.bit.in.c.zip
Mightyupload


Download


Download how.to.arrange.the.data.of.two.8.bits.in.to.a.single.16.bit.in.c.zip
Load.to


Download

Both comments and pings are currently closed.

Comments are closed.