• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Again the same question

Status
Not open for further replies.

vopap

New Member
I know I have seen it in a lot of places, but now cannot find a single one. What I need to do is to take a word value and extract say first 8 bits. How do I do that??? :cry:
 

kinjalgp

Active Member
Remove the upper 8-bits using AND operation.
Like
YourValue AND 0x00FF = Only lower 8-bits
(YourValue AND 0xFF00) >> 8 (Rotate right 8 times) = Only upper 8-bits
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top