Minnesota State Community and Technical College

Moorhead, Minnesota

Number Conversion Helps



Decimal to Binary Example
Binary to Decimal Example
Hexadecimal to Binary Example
Binary to Hexadecimal Example
Decimal to Hexadecimal Example
Hexadecimal to Decimal Example
Decimal-Binary Conversion Chart
Binary, Decimal, and Hexadecimal Chart


Return to the Home Page


Decimal to Binary Example

This is one way to convert the decimal number 194 to binary.


Decimal

Binary

Original Number – Decimal

Binary Result



194


128

1000 0000

194-128=66

1000 0000

64

0100 0000

66-64= 2

0100 0000

32

0010 0000

2-32=can't


16

0001 0000

2-16=can't


8

0000 1000

2-8=can't


4

0000 0100

2-4=can't


2

0000 0010

2-2=0

0000 0010

1

0000 0001

0-1=can't



Now, combine the binary numbers fro the Binary Result column. Make sure to maintain the same place value from the chart. In this case, decimal 194 is 1100 0010 in binary. The space in the middle (between nibbles) in binary is not necessary, but helps you see the relationship

Return to top of this page


Binary to Decimal Example

This is one way to convert the binary number 10101010 to decimal.


Decimal

Binary

Original Binary Number

Decimal Numbers to Add

128

1000 0000

1000 0000

128

64

0100 0000



32

0010 0000

0010 0000

32

16

0001 0000



8

0000 1000

0000 1000

8

4

0000 0100



2

0000 0010

0000 0010

2

1

0000 0001




The original binary number is on the chart by place value. Performing an AND on the numbers will reproduce the original binary number. Once the place value is known in Decimal add the decimal numbers in the Decimal Numbers to Add for the decimal answer. 128 + 32 + 8 + 2 = 170

Return to top of this page


Hexadecimal to Binary Example

This is one way to convert the hexadecimal number 5A to binary. This is a two step method. Convert each digit separately.


Hexadecimal

Nibble

10's place Binary

1's place Binary

0

0000



1

0001



2

0010



3

0011



4

0100



5

0101

0101


6

0110



7

0111



8

1000



9

1001



A

1010


1010

B

1011



C

1100



D

1101



E

1110



F

1111




In the number 5A, the number 5 is the most significant digit and A is the least significant digit. Another way of talking about 5A, the number 5 is in the 10's place value and A is in the 1's place value. The nibble for the most significant digit comes first in the binary number then the least significant digit. Therefore, the hexadecimal number 5A is 0101 1010 in binary.

Return to the top of this page.


Binary to Hexadecimal Example

This is one way to convert the binary number 11001011 to hexadecimal. Divide the number into two nibbles. The most significant digits or the digits in the 10's place value are 1100. The least significant digits or the digits in the 1's place value are 1011.


Nibble 1

Hexadecimal

Hexadecimal Digit 1

Nibble 2

Hexadecimal

Hexadecimal Digit 2

0000

0


0000

0


0001

1


0001

1


0010

2


0010

2


0011

3


0011

3


0100

4


0100

4


0101

5


0101

5


0110

6


0110

6


0111

7


0111

7


1000

8


1000

8


1001

9


1001

9


1010

A


1010

A


1011

B


1011

B

B

1100

C

C

1100

C


1101

D


1101

D


1110

E


1110

E


1111

F


1111

F



Take the two matching hexadecimal digits and recombine them into the hexadecimal number. In this case, the binary number 11001011 is hexadecimal CB.

Return to the top of this page.


Decimal to Hexadecimal Example

This one way to convert the decimal number 200 to hexadecimal. This is a two step method. First convert the decimal number to binary, then the binary number to hexadecimal.


Decimal

Binary

Original Number – Decimal

Binary Result



200


128

1000 0000

200-128=72

1000 0000

64

0100 0000

72-64= 8

0100 0000

32

0010 0000

8-32=can't


16

0001 0000

8-16=can't


8

0000 1000

8-8=0

0000 1000

4

0000 0100

0-4=can't


2

0000 0010

0-2=can't


1

0000 0001

0-1=can't




The decimal number 200 is 11001000 in binary. Now convert 11001000 to hexadecimal. Divide 11001000 into nibbles. The most significant nibble or the nibble in the 10's place value is 1100. The least significant nibble or the nibble in the 1's place value is 1000.


Nibble 1

Hexadecimal

Hexadecimal Digit 1

Nibble 2

Hexadecimal

Hexadecimal Digit 2

0000

0


0000

0


0001

1


0001

1


0010

2


0010

2


0011

3


0011

3


0100

4


0100

4


0101

5


0101

5


0110

6


0110

6


0111

7


0111

7


1000

8


1000

8

8

1001

9


1001

9


1010

A


1010

A


1011

B


1011

B


1100

C

C

1100

C


1101

D


1101

D


1110

E


1110

E


1111

F


1111

F




Take the two matching hexadecimal digits and recombine them into the hexadecimal number. In this case, the binary 11001000 is hexadecimal C8.


Return to the top of this page.


Hexadecimal to Decimal Example

This is one way to convert the hexadecimal number 59 to decimal. This is a two step process. First convert the hexadecimal number to binary. Then convert the binary number to decimal.


Nibble 1

Hexadecimal

Hexadecimal Digit 1

Nibble 2

Hexadecimal

Hexadecimal Digit 2

0000

0


0000

0


0001

1


0001

1


0010

2


0010

2


0011

3


0011

3


0100

4


0100

4


0101

5

5

0101

5


0110

6


0110

6


0111

7


0111

7


1000

8


1000

8


1001

9


1001

9

9

1010

A


1010

A


1011

B


1011

B


1100

C


1100

C


1101

D


1101

D


1110

E


1110

E


1111

F


1111

F




In the case of hexadecimal 59, the binary number is 01011001. Now convert binary 0101 1001 to decimal.


Decimal

Binary

Original Binary Number

Decimal Numbers to Add

128

1000 0000



64

0100 0000

0100 0000

64

32

0010 0000



16

0001 0000

0001 0000

16

8

0000 1000

0000 1000

8

4

0000 0100



2

0000 0010



1

0000 0001

0000 0001

1



The original binary number is on the chart by place value. Performing an AND on the numbers will reproduce the original binary number. Once the place value is known, add together the decimal numbers in the Decimal Numbers to Add column. 64 + 16 + 8 + 1 = 89. Therefore hexadecimal 59 is 89 decimal.


Return to the top of this page


Decimal-Binary Conversion Chart

The decimal and binary columns are useful when converting between decimal and binary. In test situations without a calculator, copy the decimal and binary columns usually helps. The space in the middle (between nibbles) in binary is not necessary, but helps you see the relationship.


Decimal

Binary

Decimal Exponent

Hexadecimal

128

1000 0000

2^7

80

64

0100 0000

2^6

40

32

0010 0000

2^5

20

16

0001 0000

2^4

10

8

0000 1000

2^3

8

4

0000 0100

2^2

4

2

0000 0010

2^1

2

1

0000 0001

2^0

1



Return to the top of this page


Binary, Decimal, and Hexadecimal Chart

This chart counts from 0 to 255 in decimal, binary, and hexadecimal. The space in the middle (between nibbles) in binary is not necessary, but helps you see a relationship.


Decimal

Binary

Hexadecimal

0

0000 0000

0

1

0000 0001

1

2

0000 0010

2

3

0000 0011

3

4

0000 0100

4

5

0000 0101

5

6

0000 0110

6

7

0000 0111

7

8

0000 1000

8

9

0000 1001

9

10

0000 1010

A

11

0000 1011

B

12

0000 1100

C

13

0000 1101

D

14

0000 1110

E

15

0000 1111

F

16

0001 0000

10

17

0001 0001

11

18

0001 0010

12

19

0001 0011

13

20

0001 0100

14

21

0001 0101

15

22

0001 0110

16

23

0001 0111

17

24

0001 1000

18

25

0001 1001

19

26

0001 1010

1A

27

0001 1011

1B

28

0001 1100

1C

29

0001 1101

1D

30

0001 1110

1E

31

0001 1111

1F

32

0010 0000

20

33

0010 0001

21

34

0010 0010

22

35

0010 0011

23

36

0010 0100

24

37

0010 0101

25

38

0010 0110

26

39

0010 0111

27

40

0010 1000

28

41

0010 1001

29

42

0010 1010

2A

43

0010 1011

2B

44

0010 1100

2C

45

0010 1101

2D

46

0010 1110

2E

47

0010 1111

2F

48

0011 0000

30

49

0011 0001

31

50

0011 0010

32

51

0011 0011

33

52

0011 0100

34

53

0011 0101

35

54

0011 0110

36

55

0011 0111

37

56

0011 1000

38

57

0011 1001

39

58

0011 1010

3A

59

0011 1011

3B

60

0011 1100

3C

61

0011 1101

3D

62

0011 1110

3E

63

0011 1111

3F

64

0100 0000

40

65

0100 0001

41

66

0100 0010

42

67

0100 0011

43

68

0100 0100

44

69

0100 0101

45

70

0100 0110

46

71

0100 0111

47

72

0100 1000

48

73

0100 1001

49

74

0100 1010

4A

75

0100 1011

4B

76

0100 1100

4C

77

0100 1101

4D

78

0100 1110

4E

79

0100 1111

4F

80

0101 0000

50

81

0101 0001

51

82

0101 0010

52

83

0101 0011

53

84

0101 0100

54

85

0101 0101

55

86

0101 0110

56

87

0101 0111

57

88

0101 1000

58

89

0101 1001

59

90

0101 1010

5A

91

0101 1011

5B

92

0101 1100

5C

93

0101 1101

5D

94

0101 1110

5E

95

0101 1111

5F

96

0110 0000

60

97

0110 0001

61

98

0110 0010

62

99

0110 0011

63

100

0110 0100

64

101

0110 0101

65

102

0110 0110

66

103

0110 0111

67

104

0110 1000

68

105

0110 1001

69

106

0110 1010

6A

107

0110 1011

6B

108

0110 1100

6C

109

0110 1101

6D

110

0110 1110

6E

111

0110 1111

6F

112

0111 0000

70

113

0111 0001

71

114

0111 0010

72

115

0111 0011

73

116

0111 0100

74

117

0111 0101

75

118

0111 0110

76

119

0111 0111

77

120

0111 1000

78

121

0111 1001

79

122

0111 1010

7A

123

0111 1011

7B

124

0111 1100

7C

125

0111 1101

7D

126

0111 1110

7E

127

0111 1111

7F

128

1000 0000

80

129

1000 0001

81

130

1000 0010

82

131

1000 0011

83

132

1000 0100

84

133

1000 0101

85

134

1000 0110

86

135

1000 0111

87

136

1000 1000

88

137

1000 1001

89

138

1000 1010

8A

139

1000 1011

8B

140

1000 1100

8C

141

1000 1101

8D

142

1000 1110

8E

143

1000 1111

8F

144

1001 0000

90

145

1001 0001

91

146

1001 0010

92

147

1001 0011

93

148

1001 0100

94

149

1001 0101

95

150

1001 0110

96

151

1001 0111

97

152

1001 1000

98

153

1001 1001

99

154

1001 1010

9A

155

1001 1011

9B

156

1001 1100

9C

157

1001 1101

9D

158

1001 1110

9E

159

1001 1111

9F

160

1010 0000

A0

161

1010 0001

A1

162

1010 0010

A2

163

1010 0011

A3

164

1010 0100

A4

165

1010 0101

A5

166

1010 0110

A6

167

1010 0111

A7

168

1010 1000

A8

169

1010 1001

A9

170

1010 1010

AA

171

1010 1011

AB

172

1010 1100

AC

173

1010 1101

AD

174

1010 1110

AE

175

1010 1111

AF

176

1011 0000

B0

177

1011 0001

B1

178

1011 0010

B2

179

1011 0011

B3

180

1011 0100

B4

181

1011 0101

B5

182

1011 0110

B6

183

1011 0111

B7

184

1011 1000

B8

185

1011 1001

B9

186

1011 1010

BA

187

1011 1011

BB

188

1011 1100

BC

189

1011 1101

BD

190

1011 1110

BE

191

1011 1111

BF

192

1100 0000

C0

193

1100 0001

C1

194

1100 0010

C2

195

1100 0011

C3

196

1100 0100

C4

197

1100 0101

C5

198

1100 0110

C6

199

1100 0111

C7

200

1100 1000

C8

201

1100 1001

C9

202

1100 1010

CA

203

1100 1011

CB

204

1100 1100

CC

205

1100 1101

CD

206

1100 1110

CE

207

1100 1111

CF

208

1101 0000

D0

209

1101 0001

D1

210

1101 0010

D2

211

1101 0011

D3

212

1101 0100

D4

213

1101 0101

D5

214

1101 0110

D6

215

1101 0111

D7

216

1101 1000

D8

217

1101 1001

D9

218

1101 1010

DA

219

1101 1011

DB

220

1101 1100

DC

221

1101 1101

DD

222

1101 1110

DE

223

1101 1111

DF

224

1110 0000

E0

225

1110 0001

E1

226

1110 0010

E2

227

1110 0011

E3

228

1110 0100

E4

229

1110 0101

E5

230

1110 0110

E6

231

1110 0111

E7

232

1110 1000

E8

233

1110 1001

E9

234

1110 1010

EA

235

1110 1011

EB

236

1110 1100

EC

237

1110 1101

ED

238

1110 1110

EE

239

1110 1111

EF

240

1111 0000

F0

241

1111 0001

F1

242

1111 0010

F2

243

1111 0011

F3

244

1111 0100

F4

245

1111 0101

F5

246

1111 0110

F6

247

1111 0111

F7

248

1111 1000

F8

249

1111 1001

F9

250

1111 1010

FA

251

1111 1011

FB

252

1111 1100

FC

253

1111 1101

FD

254

1111 1110

FE

255

1111 1111

FF


Return to the top of this page


Return to the Home Page
Contact the Webmaster
Page Creation: 9/10/2003
Page Update: August 19, 2011