TAILIEUCHUNG - Lecture Computer organization and assembly language: Chapter 2 - Dr. Safdar Hussain Bouk

Lecture 2 - Data representation. In this chapter, the following content will be discussed: Data representation, decimal representation, binary representation, two’s complement, hexadecimal representation, floating point representation. | CSC 221 Computer Organization and Assembly Language Lecture 02: Data Representation Lecture 01 Anatomy of a Computer: Detailed Block Diagram Memory Program Storage Data Storage Output Units Input Units Control Unit Datapath Arithmetic Logic Unit (ALU) Registers Common Bus (address, data & control) Processor (CPU) Lecture 01 Levels of Program Code Compilers and Assemblers Lecture Outline Data Representation Decimal Representation Binary Representation Two’s Complement Hexadecimal Representation Floating Point Representation 5 Introduction A bit is the most basic unit of information in a computer. It is a state of “on” or “off” in a digital circuit. Or “high” or “low” voltage instead of “on” or “off.” A byte is a group of eight bits. A byte is the smallest possible addressable unit of computer storage. A word is a contiguous group of bytes Word sizes of 16, 32, or 64 bits are most common. Usually a word represents a number or instruction. 5 Numbering Systems Numbering systems are characterized by their base number. In general a numbering system with a base r will have r different digits (including the 0) in its number set. These digits will range from 0 to r-1 The most widely used numbering systems are listed in the table below: Decimal Binary Hexadecimal Octal Number Systems and Bases Number’s Base “B” B unique values per digit. DECIMAL NUMBER SYSTEM Base 10: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} BINARY NUMBER SYSTEM Base 2: {0, 1} HEXADECIMAL NUMBER SYSTEM Base 16: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} Base 10 (Decimal) Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (10 of them) Example: 3217 = (3 103) + (2 102) + (1 101) + (7 100) A shorthand form we’ll also use: 103 102 101 100 3 2 1 7 Binary Numbers (Base 2) Digits: 0, 1 (2 of them) “Binary digit” = “Bit” Example: 110102 = (1 24) + (1 23) + (0 22) + (1 21) + (0 20) = 16 + 8 + 0 + 2 + 0 = 2610 Choice for machine implementation! 1 = ON / HIGH / TRUE, 0 = OFF / LOW / FALSE Binary Numbers (Base 2) Each digit (bit) .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.