Popular in Course
Popular in ComputerScienence
This 3 page Class Notes was uploaded by Jonas Bartell on Monday October 26, 2015. The Class Notes belongs to CS0447 at University of Pittsburgh taught by Staff in Fall. Since its upload, it has received 8 views. For similar materials see /class/229391/cs0447-university-of-pittsburgh in ComputerScienence at University of Pittsburgh.
Reviews for COMPUTRORGZTN&ASSMBLYLANG
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/26/15
CSCOE0447 Computer Organization and Assembly Language A Little Bit of Number Representation Sa ngyeu n Cho De t of Computer Science University of Pittsburgh Example base 10 or decimal S39 mbols in a di39 it 0 1 2 3 4 5 6 7 8 9 o 10 of them Example 3217 3x103 2x102 1x101 7x100 CSCoEO447 Computer Organization and Assemb y Language Unw my uf Mammy Number representation What is the natural quotbasequot for numbers 0 2 10 13 27 0 We are accustomed to decimal or base10 x X XXXXX UNARY x x Unary is inefficient in space All other bases are a compact way of representing numbers CsCoE0447 Computer Organization and Assemby Language unwemry ufpmsburgh Numbers and base Number with base B 3 B symbols Base 10 0123456789 0 Base 2 01 0 Base 16 0123456789abcdef Unsigned number representation 0 d31d30d1d0 is a 32digit nonnegative number 0 Value d31xB31 dgoxB30 d1xB1 doxB0 N digit base B 3 BN unique values CsCoE0447 Computer Organization and Assemby Language gummy ufpmsburgh Example base 2 or binary Base conversion S39 mbols in a di39 it O1gt Let39s do decimal to binary conversion first 0 2 of them 0 Aten dnr1dnrzd1dOtWO o quotBinary digitquot quotbitquot Given a base 1 0 number A come up with an n digit binary Example number that has the same value 11010two 1x24 1x23 0x22 1x21 0x20 16 8 o 2 o 26mquot Binary numbers go along well with Boolean logic 0 1 on 0 off CSCOEO447 Computer Organization and Assemb y Language Unwers y Bf Msbmgh CSCOEO447 Computer Organization and Assemby Language UnmmCy ufpmsbugh Base conversion Base conversion From binary to decimal From decimal to binary From binary to hexadecimal From hexadecimal to binary From decimal to hexadecimal CSCOEO447 Computer Organization and Assemb y Language Unmmty Bf Msbmgh CSC0E0447 computer Organization and Assemby Language University umesburgh Base conversion Binarl base 2 to hex base16 or hex to binarl base conversion is rather straightforward 0 Take 4 bits in binary and convert them into one hex digit and VICe versa Since binary notation tends to be long hex notation is frequently used in assembly language and in C programs More on binary number representation will be discussed when we study arithmetic 031447 Computer Organization and Assemb y Language Umvasxty uf Hasburgh