This shows you the differences between two versions of the page.
iocla:cursuri:curs-03 [2019/09/24 11:12] cristian.vijelie |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Curs 04: Reprezentarea datelor în sistemele de calcul ====== | ||
- | |||
- | <html> | ||
- | <iframe src="https://ctipub-my.sharepoint.com/personal/dragos_niculescu_upb_ro/_layouts/15/Doc.aspx?sourcedoc={f395ba84-9060-4f76-a206-3f62bc0faccc}&action=embedview&wdAr=1.3333333333333333" width="722px" height="565px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> presentation, powered by <a target="_blank" href="https://office.com/webapps">Office</a>.</iframe> | ||
- | </html> | ||
- | |||
- | * [[https://ctipub-my.sharepoint.com/:p:/g/personal/dragos_niculescu_upb_ro/EYS6lfNgkHZPogY_YrwPrMwBtJcCsRIoSsmdAV_LazXubw?e=LqM5j8|Curs 04: Reprezentarea datelor în sistemele de calcul]] | ||
- | |||
- | * Suport curs | ||
- | * Sivarama P. Dandamudi: Introduction to Assembly Language Programming | ||
- | * Appendix A: Internal Data Representation: A.1, A.2, A.3, A.4.4, A.7, A.8, A.9 | ||
- | |||
- | |||
- | |||
- | ===== Demo-uri ===== | ||
- | |||
- | <code bash> | ||
- | git clone https://github.com/iocla/curs-03-demo.git | ||
- | </code> și apoi compilăm/asamblăm<code bash> | ||
- | cd curs-03-demo; make | ||
- | </code> | ||
- | |||
- | The demo adds two bytes. | ||
- | |||
- | For signed/unsigned operations, watch flags C(arry) and O(verflow). | ||
- | |||
- | Presence of a flag means result is in the allowed interval. | ||
- | |||
- | Absence of a flag means the operation is within the allowed interval. | ||
- | |||
- | 0x2 + 0x2 | ||
- | |||
- | 0xff + 1 | ||
- | |||
- | 0xff + 0xff | ||
- | |||
- | 0xfe + 7 | ||
- | |||
- | 0x7f + 0x81 vs. 0x7f + 1 | ||
- | |||
- | 0x7f + 0x7f vs 0x7f + 0x80 | ||
- | |||
- | Exercises for C and O - find a pair that activates: | ||
- | |||
- | * none | ||
- | * only C | ||
- | * only O | ||
- | * both | ||
- | |||