Solved

Converting chars;

Posted on 2002-03-20
2
172 Views
Last Modified: 2010-04-17
Hey, this my seem funny, but it seem I found a problem I can't deal with myself. It is : What is the two's complement value of the sixteen bit number 0x34D2?

I would be grateful for any advice.
Thanks.
0
Comment
Question by:DigitalSunset
2 Comments
 
LVL 16

Accepted Solution

by:
imladris earned 75 total points
ID: 6882877
0xcb2e

The 2's complement of a hex number is its 1's complement (i.e. all bits flipped) + 1. The ones complement of 0x34d2 is 0xcb2d, so the 2's complement is 0xcb2e.
0
 

Author Comment

by:DigitalSunset
ID: 6883315
Thanks, that worked like magic.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question