当前位置:网站首页>Verilog shift operator
Verilog shift operator
2022-06-29 09:01:00 【Da Xi】
Shift operator
Shift operators include shift left (<<), Move right (>>), Arithmetic shift left (<<<), Arithmetic shift right (>>>).
The shift operator is a binocular operator , The two operands respectively represent the vector signal to be shifted ( To the left of the operator ) And the number of bits moved ( To the right of the operator ).
Arithmetic shift left and logical shift left , The low position on the right will be filled 0.
When logic moves right , The high position on the left will be filled 0; When arithmetic is shifted to the right , The high bit on the left will be supplemented by the sign bit , To ensure the correctness of the value after data reduction .
Shift can sometimes replace multiplication and division .
example
A = 4'b1100 ;
B = 4'b0010 ;
A = A >> 2 ; // The result is 4'b0011
A = A << 1; // The result is 4'b1000
A = A <<< 1 ; // The result is 4'b1000
C = B + (A>>>2); // The result is 2 + (-4/4) = 1, 4'b0001
边栏推荐
- mongoDB 持久化
- Carbon emission reduction of second-hand trading platform, with assessment standards
- How to recover data loss of USB flash disk memory card
- Activemq消息组件发布订阅ReDelivery消息重新投递
- Some "non-technical" Thoughts on distributed digital identity
- 开发小技巧-图片资源管理
- 通过ELO机制衡量各类对弈活动水平
- The difference and usage of JS for in loop and for of loop
- hostname -f与uname -n的返回值可能不同
- mysql insert 时出现Deadlock死锁场景分析
猜你喜欢
Development tips - Image Resource Management

Oracle subquery

2022年7月系统集成项目管理工程师认证招生简章

Chengtong network disk imitation blue playing network disk source code with video tutorial

The sixth season of 2022 perfect children's model Qingyuan competition area audition came to a successful conclusion

How to recover data loss of USB flash disk memory card

51单片机中断与定时器计数器,基于普中科技HC6800-ESV2.0

MQTT第二话 -- emqx高可用集群实现

工厂模式和策略模式的区别

首次触电,原来你是这样的龙蜥社区 | 龙蜥开发者说第8期
随机推荐
(pytorch进阶之路三)encoder self attention mask
搭建开源物联网平台教程
JS获取图片或base64的宽高等基本信息
二手交易平台碳减排,有了评估标准
Wallpaper applet source code double ended wechat Tiktok applet
Carbon emission reduction of second-hand trading platform, with assessment standards
关于父母离婚后子女姓名变更有关问题的批复
航芯开发板&调试器
打印服务IP设置方案
Heavyweight released "FISCO bcos application landing guide"
Product manager certification enrollment brochure (NPDP) in July 2022
来个小总结吧
Intelligent hardware EVT DVT PVT mp
verilog 归约操作符
Typescript variable declaration - type assertion
Chengtong network disk imitation blue playing network disk source code with video tutorial
积分商城运营要如何做才能获取到利润
[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)
Calculus Learning
微积分学习