133 views

Uploaded by pongelkeren

- Assignment 1 of Template ELECTRICAL Level 5 - Copy - Copy
- Sheet 1
- Chapter 1.docx
- Keyboard Symbols in Binary Representation
- TI
- Firmware Upgrading, Alignment and Test Procedures v1.1
- Digital Pi
- IntroductionToProgramming PDF
- lecture2_Numbersystems_.ppt;filename_= UTF-8''lecture2(Numbersystems)-1
- ASCII
- Logic Gates project
- 1701gex03 programming in c
- ESE218Lec2F16
- 2011_600101[1]_600101COU1L1ver1 (1)
- practicetest.pdf
- Control Network Protocol Assignment
- Number System
- Representation of Data - Revision
- TOY Machine
- ECEN 248 Lab3_report

You are on page 1of 10

Objective

• Practice converting decimal values to binary values

Background

Knowing how to convert decimal values to binary values is valuable when converting

human readable IP address in dotted decimal format to machine-readable binary format.

This is normally done for calculation of subnet masks and other tasks. The following is

an example of an IP address in 32-bit binary form and dotted decimal form.

Decimal IP Address 192.168.45.121

A tool that makes the conversion of decimal values to binary values simple is the

following table. The first row is created by counting right to left from one to eight, for the

basic eight bit positions. The table will work for any size binary value. The value row

starts with one and doubles, base 2, for each position to the left. 128 207

128

64 79

Position 8 7 6 5 4 3 2 1 64

value 12 64 32 16 8 4 2 1 8 15

8 8

1 1 0 0 1 1 1 1 4 7

12 64 0 0 8 4 2 1 4

8 2 3

2

The same conversion table and simple division can be used to convert 1

binary values to decimal values.

Steps

To convert 207 to binary

1. Start with the digit farthest to the left. Determine if the decimal value can be

divided by it. Since it will go one time, put a 1 in row three of three of the

conversion table under the 128 value and calculator the remainder, 79.

2. Since the remainder can be divided by the next value,64, put a 1 in row three

under the 54 value of the table.

3. Since the remainder cannot be divided by either 32 or 16, put 0s in row three of

our table under the 32 and 16 values.

4. Continue until there is not remainder.

5. If necessary, use row four to check the work.

Position 8 7 6 5 4 3 2 1

value 12 64 32 16 8 4 2 1

8

1 1 0 0 1 1 1 1

12 64 0 0 8 4 2 1

8

6. Convert the following decimal values to binary values:

a. 123 1111 011

b. 202 11011010

c. 67 1000011

d. 7 111

e. 252 11111100

f. 91 1011011

g. 116.127.71.3 1110100.10000011.1000111.11

h. 255.255.25.0 1111 1111.1111 1111.1111 1111.0

i. 192.143.255.255 1010000.10010001 1111 1111.11111111

j. 12.101.9.16 1100.10100001.1001.10000

This concludes the lab.

Lab 1.2.6 Decimal to Binary Conversion

Objective

• Learn to convert decimal values to values to binary values

• Practice converting decimal values to binary values

Background

The following is an example of an IP address in32-bit binary form and dotted decimal

form.

Binary IP Address 11000000.10101000.00101101.01111001

Decimal IP Address 192.168.45.121

Binary date is mode up of ones and zeros. Ones represent on and zeros represent off.

Binary data can be grouped in varying increments, 110 or 1011. in TCP/IP binary data is

usually grouped in eight digit groups called a Byte.

A Byte, 8 bits, can range from 00000000 to 11111111 creating 256 combinations with

decimal values ranging from 0 to 255. IP addressing uses 4 bytes, or 32 bits, to identify

both the network and specific device. The specific device can be a node or host. The

example at the beginning of this lab is an example of an IP address in both binary decimal

formats.

A tool that makes the conversion of binary to decimal values simple is the following

table. The first row is created by counting right to left from one to eight for the basic

eight bit positions. The tale will work for any size binary value. The value row starts with

one and doubles, base 2, for each position to the left.

Position 8 7 6 5 4 3 2 1

value 12 64 32 16 8 4 2 1

8

1 1 0 0 1 1 1 1

12 64 0 0 8 4 2 1

8

Steps

2. Put the decimal values in row four only for the third row 1s. Technically the row

two value are being multiplied by row three.

3. Now just add row four across.

Position 8 7 6 5 4 3 2 1

value 12 64 32 16 8 4 2 1

8

1 0 1 1 1 0 0 1

12 0 32 16 8 0 0 1 = 185

8

4. Convert the following binary values to decimals:

a. 1110 : 14

b. 100110 : 62

c. 11111111 : 510

d. 11010011 : 210

e. 01000001 : 65

f. 11001110 : 286

g. 01110101 : 116

h. 10001111 : 158

i. 11101001.00011011.10000000.10100100 : 132.24.128.169

j. 10101010.00110100.11100110.00010111 : 172.52.230.22

Lab 1.2.8 Hexadecimal Conversions

Objective

• Learn the process to convert hexadecimal values to decimal and binary values.

• Learn the process to convert decimal and binary values to hexadecimal values.

• Practise converting between decimal, binary and hexadecimal values.

Background / Preparation

Dec Hex Binary

The Hexadecimal (Hex) number system is used to refer to binary

numbers in a NIC or IPv6 address. The word hexadecimal comes 0 0 0000

from the Greek wors for 1. Hexadecimal is often abbreviated 1 1 0001

“ox”, zero and lower case x. Hex numbers use 16 unique digits to 2 2 0010

display any combination of eight binary digits as only two 3 3 0011

hexadecimal digits.

4 4 0100

A Byte, or 8 bits, can range from 00000000 to 11111111. A Byte 5 5 0101

can creatre 256 combination with decimal values ranging from 0 6 6 0110

to 255 or Hex values 0 to FF. Each Hex value represents only

7 7 0111

four binary bits. The alpha (A-F) values are not case sensitive.

8 8 1000

A tool that makes the conversion of hexadecimal to decimal 9 9 1001

values simple is the following table. Use the same techniques as 10 A 1010

covered in binary to decimal conversions. The first row is two

11 B 1011

Hex positions. The value row starts as 1 and 16, base 16, for each

position to left. 12 C 1100

13 D 1101

Position 2 1 14 E 1110

value 16 1

15 F 1111

Note : Steps are provided at the end of this lab in the use of the windows Scientific

Calculator to check the work.

1. Break the Hex value into pairs. Start at the right side. For example 77CE becomes

77 and CE insert in the first position if necessary to complete the first pair.

2. Put each Hex pair in row three. The value in parenthesis is decimal value A-F

3. To get the decimal vakues in row four, multiply the row two values by row three.

4. Now just add row four across.

Position 2 1

value 16 1

7 7

112 7 = 119

Position 2 1

value 16 1

C(12) E(14)

192 14 = 206

1. To be valid for the purpose of this lab, the decimal value will between 0 and 256.

the first Hex value is derided by dividing the decimal value by 16. if the value is

greater than 9 it will need to be put in Hex form A – F.

2. The second value is the remainder from step 1. If the value is greater than 9 it will

need to be put in Hex form A – F.

3. For example, 209 divided by 16 is 13 with a remainder of 1. 13 equals D in Hex.

Therefore, 209 equals D1.

1. This is the easiest conversion. Remember that each Hex value converts to four

binary bits, so work right to left.

2. For example, to convert 77AE to binary. Start with E. Use the table at the

beginning of this lab to go directly to binary. The other alternative is to convert

the value to decimal, E = 14, and then use the last four positions of the table used

in the decimal to binary conversions.

Position 4 3 2 1

value 8 4 2 1

1 1 1 0

8 4 2 0 = 1

4

3. Using the same technique, A become 1010 and the total so for is 10101110.

Position 4 3 2 1

value 8 4 2 1

1 0 1 0

8 0 2 0 = 1

0

4. Using the same technique, the two 7s each become 0111 and the total is

01110111.10101110

Position 4 3 2 1

value 8 4 2 1

0 1 1 1

0 4 2 1 = 7

1. Each Hex value equals four binary bits. Start by breaking the binary value into 4-

bit units from right to left. Add any leading zeros required to end up with all 4-bit

values. 01101110.11101100 would become 0110 1110 1110 1100.

2. use the table at the beginning of this lab to go directly to Hex. The other

alternative is to convert each 4-bit binary value to decimal, 0-15. the convert the

decimal to Hex, 0-F

Position 4 3 2 1

value 8 4 2 1

1 1 0 0

8 4 0 0 = 12 or C

Position 4 3 2 1

value 8 4 2 1

1 1 1 0

8 4 2 0 = 14 or E

Practice

Convert the following values to the other two forms:

Decimal Hex Binary

1 169 A9 10101001

2 255 FF 11111111

3 47825 BAD1 1011101011010001

4 231 – 99 – 28 E7 – 63 – 1C 11100111 – 1100011 – 11100

5 52 34 110100

6 115 73 1110011

7 19 13 1011

8 212.65.119.45 D4.41.77.2D 11010100.1000001.1110111. 101101

9 170 AA 10101010

10 6 6 110

11 252.60 FC.3C 11111100.00111100

12 12.128.240.25 C.80.F0.FF 1100.10000000.11110000.11111111

5

Checking conversions with windows calculator

It is important to be able to previous calculations manually. However, to check the work

using the windows calculator. Click on the View menu to make sure that the calculator is

in Scientific mode. Click on the button for the type of number, click on one of the

alternate buttons.

- Assignment 1 of Template ELECTRICAL Level 5 - Copy - CopyUploaded bykyawswarlin
- Sheet 1Uploaded byMohamed Farag
- Chapter 1.docxUploaded byAce Cheah Mun Chun
- Keyboard Symbols in Binary RepresentationUploaded byravikiranmusinada
- TIUploaded byThom
- Firmware Upgrading, Alignment and Test Procedures v1.1Uploaded bypepelaalfa
- Digital PiUploaded byElena Shukhman
- IntroductionToProgramming PDFUploaded byPlinio Guzman
- lecture2_Numbersystems_.ppt;filename_= UTF-8''lecture2(Numbersystems)-1Uploaded byMUHAMMAD AKRAM
- ASCIIUploaded byMaurice Ben-Oduro
- Logic Gates projectUploaded byMomen Mostafa
- 1701gex03 programming in cUploaded byapi-386308328
- ESE218Lec2F16Uploaded byJohn Hanks
- 2011_600101[1]_600101COU1L1ver1 (1)Uploaded byKiran Reddy
- practicetest.pdfUploaded byHydir Ahmed Al
- Control Network Protocol AssignmentUploaded byKanagenthiran Nagendran
- Number SystemUploaded byapi-3739054
- Representation of Data - RevisionUploaded bygexysz
- TOY MachineUploaded byManmeetSingh
- ECEN 248 Lab3_reportUploaded byRebecca Sontheimer
- Hex Lesson 1Uploaded bysam
- Excel-TUTOR.xlsUploaded bySuherman Jaka
- MTH603 Numerical Analysis PDF HandoutsUploaded bySyed Shafqat Irfan
- f1 Chapter 1 Paper 1Uploaded byfayyzal
- PIC Instruction SetUploaded byHiru Purushothaman Hirudayanathan
- 41275 ZzzUploaded byzahorecm2
- Bcd to Hex ConversionUploaded bynirmal_inbox
- Fix Abends - Dump ReadUploaded byJayanthudu Sai
- Review Exercise 4 Objective)Uploaded byVimalraj Moghan
- far2xx7_DiadnosticUploaded bykrupa kumar

- Tarif Ukt Unsoed 2013Uploaded bypongelkeren
- Hasil Rapat TPM Hakim Tgl. 28 November 2014Uploaded bypongelkeren
- Susuna Kepanitiaan Acara Pelantikan Kpn SumberUploaded bypongelkeren
- Program TesUploaded bypongelkeren
- Modul Belajar Desain Web SiteUploaded bypongelkeren
- Wilayah wilayah HukumUploaded bypongelkeren
- PAKTA INTEGRITASUploaded bypongelkeren
- Cgi TelnetUploaded byDennis Ortzuks Sugianto
- Contoh Surat Perjanjian Utang Piutang FH UIIUploaded bypanelfar
- PC NET2Uploaded bypongelkeren
- Daya Tampung 2013 UnsoedUploaded byMolyna Ulfah
- Cover Put.02pdt.2015Uploaded bypongelkeren
- TupperwareUploaded bypongelkeren
- RevisiGPP BPP DPP Satker08Januari2016Uploaded bypongelkeren
- nilai uasUploaded bypongelkeren
- FirewallUploaded bypongelkeren
- netyUploaded bypongelkeren
- Pongel KerenUploaded bypongelkeren
- siskaUploaded bypongelkeren
- Flowcart LoginUploaded bypongelkeren
- bu susyUploaded bypongelkeren
- Mang AgusUploaded bypongelkeren
- SoalUploaded bypongelkeren
- NamaUploaded bypongelkeren
- Constructive AnatomyUploaded bygazorninplotz
- siska1Uploaded bypongelkeren
- Perbaikan_SkripsiUploaded bypongelkeren
- tugase anisUploaded bypongelkeren
- tugase anisUploaded bypongelkeren

- Bridges SamplerUploaded byRF MA
- Allmendinger, Yañez, Cembrano 2006 GPS Strain Rates Numerical Modeling Northern ChileUploaded byIsabel Santibanez
- DOC-20161106-WA0011Uploaded bylosafer
- Adsk Gsg Acad2008Uploaded byLucian
- Fortinet FortiAP datasheetUploaded bypcraponi
- Agenda for Metro Board July meetingUploaded byMetro Los Angeles
- Brand Management Syllabus - Spring 2014Uploaded byLuis Martinez
- LR Matrix template.docxUploaded bySyai Genj
- arcfm_server.pdfUploaded byAnonymous fPVJlypmb6
- Silent KillersUploaded byioanitescumihai
- UP Taxation Law Pre Week 2017Uploaded byRobert Manto
- 511 peer teach 4 lpUploaded byapi-317919585
- My Royalty Agreement_SampleUploaded byLance McCoy
- Symphobia 2 Reference ManualUploaded byDarío Díez
- Computed Tomography an OverviewUploaded byEric Robinson
- timeUploaded byAlessia Lamb
- Allowances and Minmum Wage ActUploaded byjinujith
- Advanced Ultrasound-Guided Interventions for TenopathyUploaded byJuanMa Correa Sanabria
- toney id4t final reflectiveUploaded byapi-404825677
- Guide-to-Translation-and-Localization.pdfUploaded byAlexandre Weissmuller Dos Santos
- The Most Important Words - AlphabetUploaded bytekati88
- Benefiting ISA on Quality Control ( a Tool to Assessing Audit Firm)Uploaded byUmmu Zubair
- Steroid withdrawal protocols in Renal TransplantationUploaded byPeertechz Publications Inc.
- Transformers-obj-questions.pdfUploaded byphaniputta
- 10-01-27 US Office of Comptroller of the Currency: Complaint against Bank of America (Case # 00971981) -alleging conduct amounting to racketeering by Bank of America and Brian Moynihan - Response to Compalint sUploaded byHuman Rights Alert - NGO (RA)
- TPM_310406-001_ch2Uploaded byThomas Ross
- Carpenter & Patterson Constant EffortUploaded byNavab Khan
- proposal final 2Uploaded byapi-316780587
- Chapter 5-Analysis of DiversityUploaded bySam Srinivasan
- A Further Comprehensive Approach to Assessing the Groundwater Potential of the Basement Complex Terrain of Ekiti State Southwestern NigeriaUploaded byIJSTR Research Publication