TAILIEUCHUNG - Algorithms and Data Structures in C part 5

Figure Mapping of each Union Entry The organization of each union entry is shown in Figure . For the union declaration t there are only eight bytes stored in memory. | Figure Memory Implementation for Variable t Figure Mapping of each Union Entry The organization of each union entry is shown in Figure . For the union declaration t there are only eight bytes stored in memory. These eight bytes can be interpreted as eight individual characters or two longs or two doubles etc. For instance by looking at Table one sees the value of ch 0 which is 0 41 which is the letter A. Similarly the value of ch 1 is 0 42 which is the letter B. When interpreted as an integer the value of i 0 is 0 41424344 which is in 2 s complement format. Converting to decimal one has i 0 with the value of If one were to interpret 0 41424344 as an IEEE 32-bit floating point number its value would be . If one were to interpret 0 45464748 as an IEEE 32-bit floating point number its value would be . Code List Data Representations Code List Output of Program in Code List There are only one s and zero s stored in memory and collections of bits can be interpreted to be characters or integers or floating point numbers. To determine which kind of operations to perform the compiler must be able to determine the type of each operation. Problems Represent the following decimal numbers when possible in the format specified. 125 -1000 267 45 0 2500. Generate all answers in HEX a 8-bit 2 s complement 2 hex digits b 16-bit 2 s complement 4 hex digits c 32-bit 2 s complement 8 hex digits d 64-bit 2 s complement 16 hex digits Convert the 12-bit 2 s complement numbers that follows to 32-bit 2 s complement numbers. Present your answer with 8 hex digits. a 0xFA4 b 0x802 c 0x400 d 0x0FF Represent decimal in IEEE 32-bit format and IEEE 64-bit format. Represent the decimal fraction 4 7 in binary. Represent the decimal fraction in octal. Represent the decimal fraction in hex. Calculate the floating point number represented by the IEEE 32-bit representation F8080000. Calculate the floating point

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.