High Tech Services is a systems integrators in North Carolina NC for industrial, laboratory, factory automation, controls, monitoring, quality and information systems   Home   Products   Contents   Search   Contacts

ASP.NET asp dot net

Bar Codes

Books

C # sharp

CE.NET Compact Framework

Communications

Computers

Control Engines

Data Acquisition

Databases

Enclosures

ERP Framework

Factory Automation

History

Image Analysis

Infrastructure

Inputs Outputs I/O

Machine Vision

mechanical & machine design

microscopy

Miscellaneous

Motion Control

Motors & Drives

.NET

Networks

OPC OLE Process Control

Operator Interfaces

PDA Pocket PC Windows Mobile

Peripherals

process control

Power & Grounding

Products

Programmable Controllers

Quality Control

Radio Frequency RF Tags

Reference

Robots

Safety

SCADA

Signal Conditioning

Soft PLCs

Systems Architecture

Tools & Equipment

Training

Tutorials

Vertical Applications

Visual basic

 

Hexadecimal Conversions

To take all of this information with you, download our HTS PDA Tools.  It's free and we throw in the source code!

To see a list of our other reference materials click here or one of the buttons in the left hand column. 

 

Note that the calculator that comes with the Microsoft Windows operating system can do conversions.  To use the calculator click on Start, Programs, Accessories, Calculator.  Then change the calculator to "Scientific" mode by clicking on View and then Scientific.  Now you should see option buttons for Hex, Dec, Oct (Octal), and Bin (Binary).  To convert 1234 Hex to decimal you would "clear" the calculator, click the Hex option button, enter 1234 and then click the Dec option button and you should see the result 4,660.

HEX BINARY DIGIT DIGIT DIGIT DIGIT
NUMBER NUMBER X000 0X00 00X0 000X
0 0000 0 0 0 0
1 0001 4,096 256 16 1
2 0010 8,192 512 32 2
3 0011 12,288 768 48 3
4 0100 16,384 1024 64 4
5 0101 20,480 1280 80 5
6 0110 24,576 1536 96 6
7 0111 28,672 1792 112 7
8 1000 32,768 2048 128 8
9 1001 36,864 2304 144 9
A 1010 40,960 2560 160 10
B 1011 45,056 2816 176 11
C 1100 49,152 3072 192 12
D 1101 53,248 3328 208 13
E 1110 57,344 3584 224 14
F 1111 61,440 3840 240 15

 

Hex to decimal examples

1234h = 4,096 + 512 + 48 + 4 = 4,660 decimal

FC96h = 61,440 + 3,072 + 144 + 6 = 64,662 decimal

 

Decimal to Hex examples

To convert from decimal to hex find the largest decimal number less than or equal to the number you are converting and find the corresponding hex digit.  Subtract the value of that hex digit and repeat for the next digit.  

13,117 decimal to hex:

3000h = 12,288 which is less than or equal to 13,117

13,117 - 12,288 = 829

0300h = 768 which is less than or equal to 829 

829 - 768 = 61

0030h = 48 which is less than or equal to 61

61 - 48 = 13 which can be read from the table as 000Dh

Therefore 13,117 decimal = 333Dh

 

Using the Remainder Method

This method sent in by John A. Harris of Woodstock, GA:

A Decimal to Hexadecimal conversion method that does not require a table look up.  Use remainders of repeated integer divides by 16 until quotient is zero.  Convert remainders to hex (0-16 to 0-F) and line up in reverse order of rendering.

13,117 / 16 = 819 remainder 13 or D  (least significant digit)

819 / 16 = 51 with remainder of 3

51 / 16 = 3 with remainder of  3

3 / 16 = 0 with remainder of 3 (most significant digit)

333Dh

 

See Also

 

 

Hexadecimal Conversions

Click here to find out how High Tech Services can help you implement this technology. 

Copyright © 1984-2005 CompanyLongName HTS, Cary, Raleigh, RTP, North Carolina, NC.  All Rights Reserved.  All trademarks are the property of their owners. Prices and specifications subject to change without notice.