overflow

Computer Science An Overview _J. Glenn Brookshear _11th Edition

 

The point is that computers can make mistakes. So, the person using the
machine must be aware of the dangers involved. One problem is that computer
programmers and users become complacent and ignore the fact that small values
can accumulate to produce large numbers. For example, in the past it was com-
mon to use patterns of 16 bits for representing values in two’s complement nota-
tion, which meant that overflow would occur when values of 21532,768 or
larger were reached. On September 19, 1989, a hospital computer system mal-
functioned after years of reliable service. Close inspection revealed that this date
was 32,768 days after January 1, 1900, and the machine was programmed to com-
pute dates based on that starting date. Thus, because of overflow, September 19,
1989, produced a negative value—a phenomenon for which the computer’s pro-
gram was not designed to handle.
 
 
posted @   papering  阅读(202)  评论(0编辑  收藏  举报
编辑推荐:
· 从二进制到误差:逐行拆解C语言浮点运算中的4008175468544之谜
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
· 软件产品开发中常见的10个问题及处理方法
· .NET 原生驾驭 AI 新基建实战系列:向量数据库的应用与畅想
· 从问题排查到源码分析:ActiveMQ消费端频繁日志刷屏的秘密
阅读排行:
· Windows桌面应用自动更新解决方案SharpUpdater5发布
· 我的家庭实验室服务器集群硬件清单
· C# 13 中的新增功能实操
· Supergateway:MCP服务器的远程调试与集成工具
· Vue3封装支持Base64导出的电子签名组件
点击右上角即可分享
微信分享提示