tech stuff - hexadecimal, decimal and binary - zytrax … stuff - hexadecimal, decimal and binary....

Download Tech Stuff - Hexadecimal, Decimal and Binary - ZYTRAX … Stuff - Hexadecimal, Decimal and Binary. The basic unit used in the computer world is the byte (a.k.a octet), a byte (or octet)

If you can't read please download the document

Upload: ngokiet

Post on 08-Feb-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Tech Stuff - Hexadecimal, Decimal and Binary

mail us|mail this page

contact us

training|

tech stuff|tech stufftech stuffweb stuff web stuffbrowser idsmobile idsHTML5 Convertbrowser sniffingapache env'sapache ssipop-outs (css)html entities

open guides open guidesdns guideldap guide

Dec>Hex>Binsurvival stuff survival stuffssl/tls & x.509ASN.1kerberospostfixcroncryptographywxWidgets

dom stuffaudio stuff audio stuffsound primerdigital soundfrequenciesequalizationcalculatorsglossary

regex stuffcable stuff cable stufflan wiringlan & telephoners232 stuffserial primerrs alphabetcable faqmodular jacks

protocol stuff protocol stufftcp-udp-icmpipv4ipv4 Calculatoripv6ipv6 Calculatorisdn-bri802 lanss7 & sigtran

pc stuffwireless stuffcss stuff css stuffcss liquid designcss menuscss notescss short-formscss overview

ascii codesdata rate stufftelephony stuffmech. stuffDec>Hex>Binlanguage stuffelectronic stuffrfc stuff

Security

Tech Stuff - Hexadecimal, Decimal and Binary

The basic unit used in the computer world is the byte (a.k.a octet), a byte (or octet) has 8 bits (a.k.a binary digits). Most modern systems use multiples of a byte, thus, a 16-bit system is comprised of 2 bytes (2 x 8 = 16), a 32-bit system has 4 bytes (4 x 8 = 32) and a 64-bit system has 8 bytes (8 x 8 = 64). The term word, as in the description 32-bit word has largely disappeared from the technical lexicon.

The contents of any byte, for instance, in a memory location or on a network, can be expressed in many numbering systems. The most commonly used numbering systems are Decimal, Hexadecimal and Binary:Numbering SystemBaseRangeNotesDecimalbase 100 - 1,2,3...The most common numbering system - dollars, metric etc. A byte (8 bits) has 256 possible values in the range 0 - 255Binarybase 20 - 1The basic level at which the electronic circuitry in a computer works - a single bit.Hexadecimalbase 160-9, A-FEach Hexadecimal character represents 4 bits (0 - 15 decimal) which is called a nibble (a small byte - honest!). A byte (or octet) is 8 bits so is always represented by 2 Hex characters in the range 00 to FF.

Historical Note: Once upon a time, when the world, and even the author of this page, was young, computers were built with 12-bit, 24-bit and even 36-bit words (it made some sense then, just looks strange today). Each of these word sizes is divisible by 3 and used an octal (base 8) numbering system. Each 3 bit element contained 8 values in the range 0 to 7. Thus, a memory location with the 12-bit binary value of 000.001.100.111 would be written in octal as 0147.

Bit numbering

When working with binary each bit within a byte (octet) may need to be identified using a technique called bit numbering. Bit numbering can be very confusing with various standard bodies adopting different conventions. The following are all valid, and used, bit numbering conventions for describing an 8 bit byte (an octet).

Memory contents00000000Bit numbering conventionsLeft to right base 0 (IETF)01234567Left to right base 112345678Right to left base 1 (ITU)87654321Power of 276543210

Always check what convention is used on any specification. We have bowed to the inevitable and use the Left to right base 0 (IETF) standard since, because of the Internet, it is widely used and, hopefully, equally widely understood. The IETF's rationale for this standard is that it also represents unambiguously what is called network order, that is, bit 0 goes onto a network first, bit 1 second and so on. Bits also tend to come off the network in the same order they went on. Use of network order is necessary since the internal (machine) representation of data can vary enormously (all that big-endian, little-endian nonsense) but when data is stuffed onto a network it must be in a consistent order that can be used by any system, irrespective of its internal representation, that wants to use the data.

Finally, when working with binary you will frequently come accross the terms Most Significant Bit(s) (MSB) and Least Significant Bit(s) (LSB). The MSB is always on the LEFT and the LSB on the RIGHT. Thus, using IETF bit numbering the MSB is bit 0 and the LSB is bit 7, whereas using ITU bit numbering the MSB is bit 8 and the LSB is bit 1. Crystal clear, right?

8 bit byte (octet) Conversion Table:

IPv4 Decimal to Hex Conversion

DecimalHexadecimalBinaryDecimalHexadecimalBinary0000000 0000128801000 00001010000 0001129811000 00012020000 0010130821000 00103030000 0011131831000 00114040000 0100132841000 01005050000 0101133851000 01016060000 0110134861000 01107070000 0111135871000 01118080000 1000136881000 10009090000 1001137891000 1001100A0000 10101388A1000 1010110B0000 10111398B1000 1011120C0000 11001408C1000 1100130D0000 11011418D1000 1101140E0000 11101428E1000 1110150F0000 11111438F1000 111116100001 0000144901001 000017110001 0001145911001 000118120001 0010146921001 001019130001 0011147931001 001120140001 0100148941001 010021150001 0101149951001 010122160001 0110150961001 011023170001 0111151971001 011124180001 1000152981001 100025190001 1001153991001 1001261A0001 10101549A1001 1010271B0001 10111559B1001 1011281C0001 11001569C1001 1100291D0001 11011579D1001 1101301E0001 11101589E1001 1110311F0001 11111599F1001 111132200010 0000160A01010 000033210010 0001161A11010 000134220010 0010162A21010 001035230010 0011163A31010 001136240010 0100164A41010 010037250010 0101165A51010 010138260010 0110166A61010 011039270010 0111167A71010 011140280010 1000168A81010 100041290010 1001169A91010 1001422A0010 1010170AA1010 1010432B0010 1011171AB1010 1011442C0010 1100172AC1010 1100452D0010 1101173AD1010 1101462E0010 1110174AE1010 1110472F0010 1111175AF1010 111148300011 0000176B01011 000049310011 0001177B11011 000150320011 0010178B21011 001051330011 0011179B31011 001152340011 0100180B41011 010053350011 0101181B51011 010154360011 0110182B61011 011055370011 0111183B71011 011156380011 1000184B81011 100057390011 1001185B91011 1001583A0011 1010186BA1011 1010593B0011 1011187BB1011 1011603C0011 1100188BC1011 1100613D0011 1101189BD1011 1101623E0011 1110190BE1011 1110633F0011 1111191BF1011 111164400100 0000192C01100 000065410100 0001193C11100 000166420100 0010194C21100 001067430100 0011195C31100 001168440100 0100196C41100 010069450100 0101197C51100 010170460100 0110198C61100 011071471100 0111199C71100 011172480100 1000200C81100 100073490100 1001201C91100 1001744A0100 1010202CA1100 1010754B0100 1011203CB1100 1011764C0100 1100204CC1100 1100774D0100 1101205CD1100 1101784E0100 1110206CE1100 1110794F1100 1111207CF1100 111180500101 0000208D01101 000081510101 0001209D11101 000182520101 0010210D21101 001083530101 0011211D31101 001184540101 0100212D41101 010085550101 0101213D51101 010186560101 0110214D61101 011087571101 0111215D71101 011188580101 1000216D81101 100089590101 1001217D91101 1001905A0101 1010218DA1101 1010915B0100 1011219DB1101 1011925C0101 1100220DC1101 1100935D0101 1101221DD1101 1101945E0101 1110222DE1101 1110955F1101 1111223DF1101 111196600110 0000224E01110 000097610110 0001225E11110 000198620110 0010226E21110 001099630110 0011227E31110 0011100640110 0100228E41110 0100101650110 0101229E51110 0101102660110 0110230E61110 0110103671110 0111231E71110 0111104680110 1000232E81110 1000105690110 1001233E91110 10011066A0110 1010234EA1110 10101076B0110 1011235EB1110 10111086C0110 1100236EC1110 11001096D0110 1101237ED1110 11011106E0110 1110238EE1110 11101116F1110 1111239EF1110 1111112700111 0000240F01111 0000113710111 0001241F11111 0001114720111 0010242F21111 0010115730111 0011243F31111 0011116740111 0100244F41111 0100117750111 0101245F51111 0101118760111 0110246F61111 0110119771111 0111247F71111 0111120780111 1000248F81111 1000121790111 1001249F91111 10011227A0111 1010250FA1111 10101237B0111 1011251FB1111 10111247C0111 1100252FC1111 11001257D0111 1101253FD1111 11011267E0111 1110254FE1111 11101277F0111 1111255FF1111 1111

IPv4 Decimal to Hex Conversion

To convert a dotted decimal IPv4 address to hexadecimal, take each dotted decimal value and convert it using a hex calculator (standard windows calculator in scientific or prgrammer mode will do the job). This will yield:

IP address in dotted decimal = 192.168.0.5Decimal 192 = Hexadecimal = C0Decimal 168 = Hexadecimal = A8Decimal 0 = Hexadecimal = 00Decimal 5 = Hexadecimal = 05IP Address in dotted hex = C0.A8.00.05

Problems, comments, suggestions, corrections (including broken links) or something to add? Please take the time from a busy life to 'mail us' (at top of screen), the webmaster (below) or info-support at zytrax. You will have a warm inner glow for the rest of the day.

Tech Stuff

tech home

audio stuffsound primerdigital primernote frequencieseq, meters & fftcalculatorsfiles & codecsglossary

web stuffbrowser idsmobile_idsapache env varsapache ssicss popout menushtml entitiesdec > hex > bin

dom stuff

dom guidepage explorerdom navigation

css stuffcss liquid designcss popout menuscss notescss syntaxcss short-forms

language stuff

regex stuff

rfc stuffdns rfcsldap rfcsipv6 rfcstls/x.509 rfcsother rfcs

protocol stufftcp, udp, icmpipv4ipv6isdnssl/tls/x.509ss7 &sigtran802.3 lan

cable stufflan pinoutslan & telephoners232 pinoutsserial primerrs standardscable faqmodular jacks

lan wiring

rs232 wiring

dec > hex > bin

character setscharacter setsascii codesia5 codeshtml entitiesweb fonts

data rate stuff

mechanical stuffhead stylesthreads

howto stuff

survival stuffssl/tls/x.509ASN.1 & DERkerberospostfixencryptioncronwxWidgets

wireless stuffoverviewcalculatorsfresnel effectsfh vs dswireless soup

pc stuffdin & mini-din802.3 lanmonitor pinoutsserial stuffusb & firewirepc interfacesscreen resolutions

electronic stuff

tech links

open guidesdns guideldap guide

If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C standards compliant browser such as Firefox

Search

webzytrax.com

Share

Icons made by Icomoon from www.flaticon.com is licensed by CC 3.0 BY

Page

Standards

ISO (International)

IEC (International)

ANSI (US)

DIN (Germany)

ETSI (EU)

BSI (UK)

AFNOR (France)

Telecom

TIA (US)

ECIA (US)

ITU (International)

IEEE (US)

ETSI (EU)

OFCOM (UK)

Internet

IETF

IETF-RFCs

IANA

ICANN

W3C

Electronics

JEDEC

ECIA (US)

Site

Copyright 1994 - 2018 ZyTrax, Inc. All rights reserved. Legal and Privacysite by zytrax web-master at zytrax

Page modified: August 15 2017.