SlideShare a Scribd company logo
1 of 49
Download to read offline
1
3
ก F
F ( F 2 8 16)
ִก
ִ F 2 8 16
ก F
ก F BCD, EBCDIC,
ASCII
ก F
2
( 2,8,10,16)
Place Value: F ก F ก
F ก F กก F
ก ก F
Least significant digit : F ก
F
Most significant digit : F ก
ก F F ก ก ก F 10
3
F
2 0,1
8 0,1,2,3,4,5,6,7
10 0,1,2,3,4,5,6,7,8,9
16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
4
ก
ก ˈ 10
ก 10 ˈ
ก 2 ˈ 8 16
ก 8 16 ˈ 2
5
ก ˈ 10
F ก
F ก
F ก
. . 11012 = ( )10
F ก
23 22 21 20
(1*8)+(1*4)+(0*2)+(1*1) = 13
6
ก 10 ˈ
ก
F ก MODULO
ִ 10 ˈ F ก
ִ F ก กก
ִ F ก F F
ִ ก F ก F ˈ Most significant
7
F ก 10 ˈ
132
2 6 1
2 3 0
1 1
1310 = ( )2
11012
1310 = ( ) 4
4 13
3 1
314
8
ก 10 ˈ
ก : ก F ˈ 2 F
F F F MODULO
F
ִ F ก F
ִ F F F
F ก
9
F ก 10 ˈ
132
2 6 1
2 3 0
1 1
13.4 10 = ( )2
.4 * 2 = 0 .8
.8 * 2 = 1 .6
.6 * 2 = 1 .2
.2 * 2 = 0 .4
Ans: 1101.01102
10
ก 2 ˈ 8 16
กก Fก ก F
ִ 2 ˈ 8 ก F 3
ִ 2 ˈ 16 ก F 4
ก F ก F กก F F F 0
11
F ก 2 ˈ 8
111112 = ( 37 ) 8
0 1 1
(0*4)+(1*2)+(1*1)
3 7
1 1 1
(1*4)+(1*2)+(1*1)
12
F ก 2 ˈ 16
0001.112 = (1.C ) 16
1 1 0 0
(1*8)+(1*4)+(0*2)+(0*1)(0*8)+(0*4)+(0*2)+(1*1)
1
12
C
0 0 0 1 0 0
13
ก 8 16 ˈ 2
F กก ก F ก ก ˈ
8 ก ก ˈ 2 F 3
16 ก ก ˈ 2 F 4
14
F ก 8 16 ˈ 2
ก
738 =( ) 2
7 3
1 1 1 0 1 1
A316 = ( ) 2
10 3
1 0 1 0 0 0 1 1
Ans: 1110112
Ans: 1010000116
15
F ก 8 16 ˈ 2
ก
7.38 =( ) 2
7 . 3
1 1 1 0 1 1
A3.B16 = ( ) 2
10 3 . 11
1 0 1 0 0 0 1 1
Ans: 111 . 0112
Ans: 10100001.101116
1 0 1 1
16
ก
ก ก
ก
ก Complement
17
ก ก
ก ก
1101.112
+
0111.012
10101.00 2
5345
+
1235
F F
F
5 5
F31C16
+
235016
1266C16
18
ก
ก
4325
-
1435
2345
1011.0112
-
0111.1012
0011.1102
19
ก F (Complement)
Complement ( F R ) 2
Complement R Complement R-1
R-1’ Comp. R’ Comp
2 1’ Comp 2’ Comp.
8 7’ Comp 8’ Comp
10 9’ Comp 10’ Comp
20
ก F F
ก F R-1
ִ F F
ִ F F
ִ 2910 F 99
9’ Comp : 99 -29 = 70
ִ 101.112 F 111.11
1 ‘Comp : 111.11 - 101.11 = 010.00
21
ก F F
ก F R
ִ F ก F F ก ก ก
F F F ก
ִ 2910 F ˈ
 10 ‘ Comp : (99 + 1) - 29 = 71
ִ 101.112 ˈ
 2 ‘Comp: (111.11 + .01) - 101.11 = 0010.01
22
F ก ก ก F
ก R-1 Complement ก
ก ก
1’ Complement 2 ก F
F F ก F
F R-1 Complement F F ก F R
Complement F 1 ก
ִ 2’Comp = 1’ Comp + 1 ก
23
ก F
F
F F ก ก
F F F ก ก
ִก R’ Comp. F
ִก R-1’ Comp. F ก ก กก F
F
24
F ก F
R-1’ Comp.
4325 - 1435 = ?
1) 444 - 143 = 301
2) 432 +
301
1 233 +
1
234
1011.011 2- 111.1012 = ?
1) 111.111 - 111.101= 000.010
2) 1011.011 +
1000.010
1 0011.101 +
1
0011.110
1 0 1
25
F ก F
F R
4325 - 1435 = ?
1) 1000 - 143 = 302
2) 432 +
302
1 234
1011.011 2- 111.1012 = ?
1) 10000.000 - 0111.101=1000.011
2) 1011.011 +
1000.011
1 0011.110
26
F F ˈ F
ִ ก F F
ִ ก ก ก F F ก ก
F ˈ F ก F ก
ִ ก F F F F
F ˈ F ก
F ก F
***ก F F ก F
27
F ก F
***ก F F ก F
ตัวอยาง 10112-11002= ?
1011+
0011
1110
2
1111-1110 = 0001-3
1111-1100= 00111
F
R-1 complement
ขอแตกตางจาก R comp.
28
F F ˈ F
ִ ก F F
ִ ก ก ก F F ก ก
F ˈ F ก F ก
ִ ก F F F F
F ˈ F ก
F ก F
***ก F F ก F
29
F ก F
***ก F F ก F
ตัวอยาง 10112-11002= ?
1011+
0100
1111
2
10000-1111 = 0001-3
10000-1100= 01001
คําถาม : ใชวิธีลบแบบใดอยู
R-1 หรือ R complement ?
ดูจาก
30
ก F F
Data Representation
ก F ˈ ก (Alphanumeric
Data Representation)
ก F ˈ (Numeric Data
Representation)
ִ (Integer Representation)
ִ (Floating Point Representation)
31
ก F ˈ ก
BCD : Binary Coded Decimal Code
EBCDIC: Extended Binary Coded
Decimal Interchange Code
ASCII : American Standard Code for
Information Interchange
32
BCD
F 6 ก 1
ก F 64 ( 26 )
C B A 8 4 2 1
Digit bit
Zone bit
Check bit/ Parity bit
33
BCD
ก BCD
ִ ก (0 - 9) Zone Bit ˈ 00
ִ ก ก ก F Zone bit
ˈ 11
34
EBCDIC
F 8 ก 1
ก F 256 ( 28 )
C B A 8 4 2 1
Digit bit
Zone bit
Check bit/ Parity bit
35
EBCDIC
ก ก F EBCDIC 2
ִก ก Zone Decimal
ִก ก Packed Decimal
ก ก Zone bit F ˈ
1111 F F ( 15 ,F)
1100 ก (+,12 ,C)
1101 (-,13 ,D)
36
ก F Packed Decimal
ˈ ก ก ก ก EBCDIC F F
ก
ก ก F F
F Fก ˈ
37
ก PACK
“-123”
F Zone bit Digit bit F
Zone bit F
F ˈ Digit Bit F
ก F 16 (123D)16
Unpack ก F ก ก Pack
1101 0001 1101 0010 1101 0011
38
ASCII
2 7 ก 8 ก F F F ก F
ก ˈ ˆ
ก F EBCDIC Zone bit ˈ
ִ 0101 011
ִ ก 1010 100
39
Parity bit Check bit
ˈ F ก
2
Even Parity F
F ˈ 1
ˈ F
Odd Parity
F ˈ 1
ˈ
1 1 1 0 0 0 1
0 1 1 0 1 0 1
0 1 1 0 0 0 1
1 1 1 0 1 0 1
40
ก F ˈ
ก F ก F
(Fixed length word) 1
half-word F 2 F
Full-word F 4 F
Double-word F 8 F
41
ก
Sign Magnitude / Pure binary code
2’ Complement
1’ Complement
42
Sign Magnitude
F ก F Sign bit
ก F Magnitude
Sign
bit Magnitude
MSB LSB
1
0 ก 1 Word = 4 Byte = 32 Bit
43
ก F
Sign Magnitude
1 Word = 4 Byte = 32 bit
31 32 2 1 0
25=1100120 0 0 0 1 1 0 0 1.........................
-251 0 0 ......................... 0 1 1 0 0 1
44
ก F
2’ Complement
ˈ F
ก
ִ ก Sign Magnitude
ִ F F 2’ Complement
45
F ก F 2’ Complement
F 28 = 111002
MSB LSB
0 000000.............0000000000 1 1 1 0 0
1 111111.............1111111111 0 0 0 1 1
+
1
1 111111.............1111111111 0 0 1 0 0
46
Floating Point Representation
R = + - M * B+- E
Sign Exponent Mantissa
31 30 24 0
S Sign ก
E Exponent F กก
M Mantissa F
47
ก Floating point
ˈ 16
Normalization 16 ( ก
ก )
Sign, Exponent, Mantissa ˈ 2
ִSign : 1 F 0 F ก
ִMantissa : ˈ 2 ก F
F
48
ก Floating point
Exponent ˈ F F ก F F
Excess 64
ִexponent 16 = 4016 + true exponent16
ִexponent16 ----> exponent 2
49
F Floating point
28 ----> 1C16
1C16 = (+.1C * 102)16
Sign ----> 0
Mantissa ----> 0001 11002
Exponent ----> 4016 + 216 = 42 16 -----> 100 00102
0 100 0010 0001 11000000..........................

More Related Content

Viewers also liked (6)

pankanson
pankansonpankanson
pankanson
 
ใบความรู้ที่3
ใบความรู้ที่3ใบความรู้ที่3
ใบความรู้ที่3
 
องค์ประกอบคอมฯ
องค์ประกอบคอมฯองค์ประกอบคอมฯ
องค์ประกอบคอมฯ
 
ใบความรู้ที่ 5
ใบความรู้ที่ 5ใบความรู้ที่ 5
ใบความรู้ที่ 5
 
ใบความรู้ที่ 8
ใบความรู้ที่ 8ใบความรู้ที่ 8
ใบความรู้ที่ 8
 
แฟ้มประวัติ
แฟ้มประวัติแฟ้มประวัติ
แฟ้มประวัติ
 

Similar to data1

7 วิชา ฟิสิกส์ the brain
7 วิชา ฟิสิกส์   the brain7 วิชา ฟิสิกส์   the brain
7 วิชา ฟิสิกส์ the brain
Hiran Vayakk
 
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
Orca Whale
 
Fibonacci Sequence and The Golden Ratio.pptx
Fibonacci Sequence and The Golden Ratio.pptxFibonacci Sequence and The Golden Ratio.pptx
Fibonacci Sequence and The Golden Ratio.pptx
JacobEstilo3
 
Ch03 Ch06 Des And Others
Ch03 Ch06 Des And OthersCh03 Ch06 Des And Others
Ch03 Ch06 Des And Others
nathanurag
 

Similar to data1 (20)

Eneett re 24
Eneett re 24Eneett re 24
Eneett re 24
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo Algorithm
 
Data Formats used by Computers
Data Formats used by ComputersData Formats used by Computers
Data Formats used by Computers
 
Introduction to Information Technology Lecture 3
Introduction to Information Technology Lecture 3Introduction to Information Technology Lecture 3
Introduction to Information Technology Lecture 3
 
7 วิชา ฟิสิกส์ the brain
7 วิชา ฟิสิกส์   the brain7 วิชา ฟิสิกส์   the brain
7 วิชา ฟิสิกส์ the brain
 
laplace transform and inverse laplace, properties, Inverse Laplace Calculatio...
laplace transform and inverse laplace, properties, Inverse Laplace Calculatio...laplace transform and inverse laplace, properties, Inverse Laplace Calculatio...
laplace transform and inverse laplace, properties, Inverse Laplace Calculatio...
 
aho corasick paper study note
 aho corasick paper study note aho corasick paper study note
aho corasick paper study note
 
Lecture ascii and ebcdic codes
Lecture ascii and ebcdic codesLecture ascii and ebcdic codes
Lecture ascii and ebcdic codes
 
202 e11
202 e11202 e11
202 e11
 
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
Effects of Climatic Condition on Off-season Mangosteen Production in Phatthal...
 
Mba admission in india
Mba admission in indiaMba admission in india
Mba admission in india
 
16
1616
16
 
Sequential circuits digital logic sesign
Sequential circuits digital logic sesignSequential circuits digital logic sesign
Sequential circuits digital logic sesign
 
Fibonacci Sequence and The Golden Ratio.pptx
Fibonacci Sequence and The Golden Ratio.pptxFibonacci Sequence and The Golden Ratio.pptx
Fibonacci Sequence and The Golden Ratio.pptx
 
Ch03 Ch06 Des And Others
Ch03 Ch06 Des And OthersCh03 Ch06 Des And Others
Ch03 Ch06 Des And Others
 
unit-i-number-systems.pdf
unit-i-number-systems.pdfunit-i-number-systems.pdf
unit-i-number-systems.pdf
 
Admissions in india 2015
Admissions in india 2015Admissions in india 2015
Admissions in india 2015
 
Computer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption StandardComputer Security Lecture 5: Simplified Advanced Encryption Standard
Computer Security Lecture 5: Simplified Advanced Encryption Standard
 
Instruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware TechniquesInstruction Level Parallelism – Hardware Techniques
Instruction Level Parallelism – Hardware Techniques
 
Signals and systems analysis using transform methods and matlab 3rd edition r...
Signals and systems analysis using transform methods and matlab 3rd edition r...Signals and systems analysis using transform methods and matlab 3rd edition r...
Signals and systems analysis using transform methods and matlab 3rd edition r...
 

More from rorsuelee

More from rorsuelee (20)

ใบความรู้ที่ 9
ใบความรู้ที่ 9ใบความรู้ที่ 9
ใบความรู้ที่ 9
 
ใบความรู้ที่ 7
ใบความรู้ที่ 7ใบความรู้ที่ 7
ใบความรู้ที่ 7
 
ใบความรู้ที่ 6
ใบความรู้ที่ 6ใบความรู้ที่ 6
ใบความรู้ที่ 6
 
ใบความรู้ที่ 4
ใบความรู้ที่ 4ใบความรู้ที่ 4
ใบความรู้ที่ 4
 
ใบความรู้ที่1
ใบความรู้ที่1ใบความรู้ที่1
ใบความรู้ที่1
 
lucksud
lucksudlucksud
lucksud
 
data
datadata
data
 
การจัการข้อมูล
การจัการข้อมูลการจัการข้อมูล
การจัการข้อมูล
 
สารสนเทศ
สารสนเทศสารสนเทศ
สารสนเทศ
 
คอมพิวเตอร์
คอมพิวเตอร์คอมพิวเตอร์
คอมพิวเตอร์
 
องค์ประกอบของเทคโนโลยีสื่อประสม
องค์ประกอบของเทคโนโลยีสื่อประสมองค์ประกอบของเทคโนโลยีสื่อประสม
องค์ประกอบของเทคโนโลยีสื่อประสม
 
สื่อคอมฯ
สื่อคอมฯสื่อคอมฯ
สื่อคอมฯ
 
วิจัย
วิจัยวิจัย
วิจัย
 
บุคลากร
บุคลากรบุคลากร
บุคลากร
 
วิจัย
วิจัยวิจัย
วิจัย
 
ข้อมูลนักเรียน
ข้อมูลนักเรียนข้อมูลนักเรียน
ข้อมูลนักเรียน
 
ปฎิทิน
ปฎิทินปฎิทิน
ปฎิทิน
 
แผนที่
แผนที่แผนที่
แผนที่
 
โครงการพระราชดำริ
โครงการพระราชดำริโครงการพระราชดำริ
โครงการพระราชดำริ
 
แผนกลยุทธ์
แผนกลยุทธ์แผนกลยุทธ์
แผนกลยุทธ์
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 

data1

  • 1. 1 3 ก F F ( F 2 8 16) ִก ִ F 2 8 16 ก F ก F BCD, EBCDIC, ASCII ก F
  • 2. 2 ( 2,8,10,16) Place Value: F ก F ก F ก F กก F ก ก F Least significant digit : F ก F Most significant digit : F ก ก F F ก ก ก F 10
  • 3. 3 F 2 0,1 8 0,1,2,3,4,5,6,7 10 0,1,2,3,4,5,6,7,8,9 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
  • 4. 4 ก ก ˈ 10 ก 10 ˈ ก 2 ˈ 8 16 ก 8 16 ˈ 2
  • 5. 5 ก ˈ 10 F ก F ก F ก . . 11012 = ( )10 F ก 23 22 21 20 (1*8)+(1*4)+(0*2)+(1*1) = 13
  • 6. 6 ก 10 ˈ ก F ก MODULO ִ 10 ˈ F ก ִ F ก กก ִ F ก F F ִ ก F ก F ˈ Most significant
  • 7. 7 F ก 10 ˈ 132 2 6 1 2 3 0 1 1 1310 = ( )2 11012 1310 = ( ) 4 4 13 3 1 314
  • 8. 8 ก 10 ˈ ก : ก F ˈ 2 F F F F MODULO F ִ F ก F ִ F F F F ก
  • 9. 9 F ก 10 ˈ 132 2 6 1 2 3 0 1 1 13.4 10 = ( )2 .4 * 2 = 0 .8 .8 * 2 = 1 .6 .6 * 2 = 1 .2 .2 * 2 = 0 .4 Ans: 1101.01102
  • 10. 10 ก 2 ˈ 8 16 กก Fก ก F ִ 2 ˈ 8 ก F 3 ִ 2 ˈ 16 ก F 4 ก F ก F กก F F F 0
  • 11. 11 F ก 2 ˈ 8 111112 = ( 37 ) 8 0 1 1 (0*4)+(1*2)+(1*1) 3 7 1 1 1 (1*4)+(1*2)+(1*1)
  • 12. 12 F ก 2 ˈ 16 0001.112 = (1.C ) 16 1 1 0 0 (1*8)+(1*4)+(0*2)+(0*1)(0*8)+(0*4)+(0*2)+(1*1) 1 12 C 0 0 0 1 0 0
  • 13. 13 ก 8 16 ˈ 2 F กก ก F ก ก ˈ 8 ก ก ˈ 2 F 3 16 ก ก ˈ 2 F 4
  • 14. 14 F ก 8 16 ˈ 2 ก 738 =( ) 2 7 3 1 1 1 0 1 1 A316 = ( ) 2 10 3 1 0 1 0 0 0 1 1 Ans: 1110112 Ans: 1010000116
  • 15. 15 F ก 8 16 ˈ 2 ก 7.38 =( ) 2 7 . 3 1 1 1 0 1 1 A3.B16 = ( ) 2 10 3 . 11 1 0 1 0 0 0 1 1 Ans: 111 . 0112 Ans: 10100001.101116 1 0 1 1
  • 17. 17 ก ก ก ก 1101.112 + 0111.012 10101.00 2 5345 + 1235 F F F 5 5 F31C16 + 235016 1266C16
  • 19. 19 ก F (Complement) Complement ( F R ) 2 Complement R Complement R-1 R-1’ Comp. R’ Comp 2 1’ Comp 2’ Comp. 8 7’ Comp 8’ Comp 10 9’ Comp 10’ Comp
  • 20. 20 ก F F ก F R-1 ִ F F ִ F F ִ 2910 F 99 9’ Comp : 99 -29 = 70 ִ 101.112 F 111.11 1 ‘Comp : 111.11 - 101.11 = 010.00
  • 21. 21 ก F F ก F R ִ F ก F F ก ก ก F F F ก ִ 2910 F ˈ  10 ‘ Comp : (99 + 1) - 29 = 71 ִ 101.112 ˈ  2 ‘Comp: (111.11 + .01) - 101.11 = 0010.01
  • 22. 22 F ก ก ก F ก R-1 Complement ก ก ก 1’ Complement 2 ก F F F ก F F R-1 Complement F F ก F R Complement F 1 ก ִ 2’Comp = 1’ Comp + 1 ก
  • 23. 23 ก F F F F ก ก F F F ก ก ִก R’ Comp. F ִก R-1’ Comp. F ก ก กก F F
  • 24. 24 F ก F R-1’ Comp. 4325 - 1435 = ? 1) 444 - 143 = 301 2) 432 + 301 1 233 + 1 234 1011.011 2- 111.1012 = ? 1) 111.111 - 111.101= 000.010 2) 1011.011 + 1000.010 1 0011.101 + 1 0011.110 1 0 1
  • 25. 25 F ก F F R 4325 - 1435 = ? 1) 1000 - 143 = 302 2) 432 + 302 1 234 1011.011 2- 111.1012 = ? 1) 10000.000 - 0111.101=1000.011 2) 1011.011 + 1000.011 1 0011.110
  • 26. 26 F F ˈ F ִ ก F F ִ ก ก ก F F ก ก F ˈ F ก F ก ִ ก F F F F F ˈ F ก F ก F ***ก F F ก F
  • 27. 27 F ก F ***ก F F ก F ตัวอยาง 10112-11002= ? 1011+ 0011 1110 2 1111-1110 = 0001-3 1111-1100= 00111 F R-1 complement ขอแตกตางจาก R comp.
  • 28. 28 F F ˈ F ִ ก F F ִ ก ก ก F F ก ก F ˈ F ก F ก ִ ก F F F F F ˈ F ก F ก F ***ก F F ก F
  • 29. 29 F ก F ***ก F F ก F ตัวอยาง 10112-11002= ? 1011+ 0100 1111 2 10000-1111 = 0001-3 10000-1100= 01001 คําถาม : ใชวิธีลบแบบใดอยู R-1 หรือ R complement ? ดูจาก
  • 30. 30 ก F F Data Representation ก F ˈ ก (Alphanumeric Data Representation) ก F ˈ (Numeric Data Representation) ִ (Integer Representation) ִ (Floating Point Representation)
  • 31. 31 ก F ˈ ก BCD : Binary Coded Decimal Code EBCDIC: Extended Binary Coded Decimal Interchange Code ASCII : American Standard Code for Information Interchange
  • 32. 32 BCD F 6 ก 1 ก F 64 ( 26 ) C B A 8 4 2 1 Digit bit Zone bit Check bit/ Parity bit
  • 33. 33 BCD ก BCD ִ ก (0 - 9) Zone Bit ˈ 00 ִ ก ก ก F Zone bit ˈ 11
  • 34. 34 EBCDIC F 8 ก 1 ก F 256 ( 28 ) C B A 8 4 2 1 Digit bit Zone bit Check bit/ Parity bit
  • 35. 35 EBCDIC ก ก F EBCDIC 2 ִก ก Zone Decimal ִก ก Packed Decimal ก ก Zone bit F ˈ 1111 F F ( 15 ,F) 1100 ก (+,12 ,C) 1101 (-,13 ,D)
  • 36. 36 ก F Packed Decimal ˈ ก ก ก ก EBCDIC F F ก ก ก F F F Fก ˈ
  • 37. 37 ก PACK “-123” F Zone bit Digit bit F Zone bit F F ˈ Digit Bit F ก F 16 (123D)16 Unpack ก F ก ก Pack 1101 0001 1101 0010 1101 0011
  • 38. 38 ASCII 2 7 ก 8 ก F F F ก F ก ˈ ˆ ก F EBCDIC Zone bit ˈ ִ 0101 011 ִ ก 1010 100
  • 39. 39 Parity bit Check bit ˈ F ก 2 Even Parity F F ˈ 1 ˈ F Odd Parity F ˈ 1 ˈ 1 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 1 0 1
  • 40. 40 ก F ˈ ก F ก F (Fixed length word) 1 half-word F 2 F Full-word F 4 F Double-word F 8 F
  • 41. 41 ก Sign Magnitude / Pure binary code 2’ Complement 1’ Complement
  • 42. 42 Sign Magnitude F ก F Sign bit ก F Magnitude Sign bit Magnitude MSB LSB 1 0 ก 1 Word = 4 Byte = 32 Bit
  • 43. 43 ก F Sign Magnitude 1 Word = 4 Byte = 32 bit 31 32 2 1 0 25=1100120 0 0 0 1 1 0 0 1......................... -251 0 0 ......................... 0 1 1 0 0 1
  • 44. 44 ก F 2’ Complement ˈ F ก ִ ก Sign Magnitude ִ F F 2’ Complement
  • 45. 45 F ก F 2’ Complement F 28 = 111002 MSB LSB 0 000000.............0000000000 1 1 1 0 0 1 111111.............1111111111 0 0 0 1 1 + 1 1 111111.............1111111111 0 0 1 0 0
  • 46. 46 Floating Point Representation R = + - M * B+- E Sign Exponent Mantissa 31 30 24 0 S Sign ก E Exponent F กก M Mantissa F
  • 47. 47 ก Floating point ˈ 16 Normalization 16 ( ก ก ) Sign, Exponent, Mantissa ˈ 2 ִSign : 1 F 0 F ก ִMantissa : ˈ 2 ก F F
  • 48. 48 ก Floating point Exponent ˈ F F ก F F Excess 64 ִexponent 16 = 4016 + true exponent16 ִexponent16 ----> exponent 2
  • 49. 49 F Floating point 28 ----> 1C16 1C16 = (+.1C * 102)16 Sign ----> 0 Mantissa ----> 0001 11002 Exponent ----> 4016 + 216 = 42 16 -----> 100 00102 0 100 0010 0001 11000000..........................