binary (1)

binary (1) - 6 1 3 10 10 10 2 1 6 x 100+ 1 x 10 + 3 x 1...

Info iconThis preview shows pages 1–19. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6 1 3 10 10 10 2 1 6 x 100+ 1 x 10 + 3 x 1 =613 Base 10 digits {0...9} 1 1 0 1 2 2 2 1 2 2 3 1 x 8+ 1 x 4+ 0 x 2+ 1 x 1 = 13 Base 2 digits {0, 1} decimal binary 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 The binary equivalents of some decimal numbers. parent Left child right child A binary tree consists of a set of nodes each of which can have at most two children. root leaf leaf leaf The top node of the tree is called the root. A leaf is a node with no descendants. 1 1 0 1 2 2 2 1 2 2 3 The binary digits ( bits ) in the computers memory are initially set to zero. To represent a number, the appropriate bits are set to 1. 13 (dec) 4 (dec) = Multiplying by 2 in machine language is accomplished by shifting left one bit. 000100 4 (dec) = 8 (dec) = Multiplying by 2 in machine language is accomplished by shifting left one bit. 000100 001000 4 (dec) = 8 (dec) = 16 (dec) = Multiplying by 2 in machine language is accomplished by shifting left one bit. 000100 001000 010000 4 (dec) = 8 (dec) = 16 (dec) = 000100 001000 010000 5 (dec) = 9 (dec) = 17 (dec) = 000101 001001 010001 We obtain the next integer by adding a 1 to the binary number. n 2n 2n+1 Construct a tree using the following: If the parent s node number is n, the left childs is 2*n and the right childs is 2*n + 1. 1 We assign 1 to the roots node number 1 2 Then, the left childs node number is 2 1 2 3 And the right childs node number is 3. 1 2 3 4 5 6 7 A graphical way of getting the binary equivalents of decimal numbers. Place a 0 on each left edge. 1 2 3 4 5 6 7 A graphical way of getting the binary equivalents of decimal numbers. Place a 0 on each left edge. 1 2 3 4 5 6 7 A graphical way of getting the binary equivalents of decimal numbers. Place a 0 on each left edge. 1 2 3 4 5 6 7 1 A graphical way of getting the binary equivalents of decimal numbers. Place a 0 on each left edge and a 1 on each right edge of a binary tree. 1...
View Full Document

Page1 / 71

binary (1) - 6 1 3 10 10 10 2 1 6 x 100+ 1 x 10 + 3 x 1...

This preview shows document pages 1 - 19. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online