ECE15A-Homework1-Winter2014 (1)

# A10100111b01100111are

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: epresent negative numbers, what range of integers can be stored in the computer? Express you answer in decimal. [ 26 1 1 1 ­ ­ ] ­ 1 ­ ­ , 26 1 1 [ 25 1 1 ­ ] ­ 1 ­ , 25 1 [377,377 ­26 26] 4. A computer has a word length of 8 bits including sign. A= 10100111, B = 01100111 are 2’s complement numbers. Perform the following operations and indicate whether overflow occurs: (2p) (a) A+B cry ar: 11x1x 1x11 A 0011(8) 1101 ­9 + B 1011(0) 0101 13 = 10010(goenwls i) 0011 inr e atbt ⇒ 0010(4 0011 1) N vrlw(attocrybt r ae o+e a ee ooefo ls w ar isaesm,psngcnnvr oefo) vrlw (2p) (b) A­B ­ B= 1010+ 0101 01001=1010 cry ar: 1111x 0111 A 0011(8) 1101 ­9 +­) (B 0101(13 1010 ­0) = 11000(12 1000=(4 0000 ­9)⇒ 0000 6) Oefo a curd(attocrybt r ifrn,ngngps vrlwhsocre ls w ar isaedfeet e+e=o i hscs hc sbd nti aewihi a) (2p) Give the decimal values of A and B A : 1101 0011 = ­0010+) (11001 = ­1101 0010 = ­6+681 (41++) = ­9 8 B : 0101 1011 = 6+2421 43+++ = 13 0 5. A computer has a word length of 8 bits including sign. Convert decimal +67 and +18 to binary using the signed 2’s complement representation. Then perform the binary equivalent of : Convert the answers back to decimal and verify that they are correct. (6) +7: 6/ =3+ 72 31 3/ =1+ 32 61 1/ =80 62 + 82 =40 / + 42 =20 / + 22 =10 / + 12 =01 / + 1 0 0 1 ⇒ 1 0 0 1 ( 6 ) 001 0001 +7 (6) ­7: 0001 1001 1110+ 01101 1110(6) 0111­7 (1) +8: 1/ =90 82 + 92 =41 / + 42 =20 / + 22 =10 / + 12 =01 / + 1 0 0 ⇒ 0 1 0 0 ( 1 ) 01 0001...
View Full Document

## This document was uploaded on 03/17/2014 for the course ECE 15A at UCSB.

Ask a homework question - tutors are online