Solved

Converting chars;

Posted on 2002-03-20
2
147 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now