You are on page 1of 5

University of Illinois at Urbana-Champaign

Dept. of Electrical and Computer Engineering

ECE 120: Introduction to Computing

Representations Binary Number Using


Decision Tree

ECE 120: Introduction to Computing slide 1


Decision Tree Representation of Binary Number
[0,15]
0 1

[0,7] [8,15]
0 1 0 1

[0,3] [4,7] [8,11] [12,15]


0 1 1 0 1 0 1
0

[0,1] [2,3] [4,5] [6,7] [8, 9] [10,11] [12,13] [14,15]


0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

ECE 120: Introduction to Computing slide 2


Finding Binary of 13 = 1101
[0,15]
0 1

[0,7] [8,15]
0 1 0 1

[0,3] [4,7] [8,11] [12,15]


0 1 0 1 0 1
0 1

[0,1] [2,3] [4,5] [6,7] [8, 9] [10,11] [12,13] [14,15]


0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

ECE 120: Introduction to Computing slide 3


Finding Binary of 7 = 0111
[0,15]
0 1

[0,7] [8,15]
0 1 0 1

[0,3] [4,7] [8,11] [12,15]


0 1 1 0 1 0 1
0

[0,1] [2,3] [4,5] [6,7] [8, 9] [10,11] [12,13] [14,15]


0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

ECE 120: Introduction to Computing slide 4


Decision Tree can be created Recursively
[0,15]
0 1

[0,7] [8,15]
0 1 0 1

[0,3] [4,7] [8,11] [12,15]


0 1 1 0 1 0 1
0

[0,1] [2,3] [4,5] [6,7] [8, 9] [10,11] [12,13] [14,15]


0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

ECE 120: Introduction to Computing slide 5

You might also like