0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

北美ASIC经典面试试题

数字前端ic芯片设计 来源:未知 作者:邓佳佳 2018-03-21 15:09 次阅读

Question:

Come up with logic that counts number of ‘1’s in a 7 bit wide vector.You can only use combinational logic.

Answer:

Following is one of the ways to come up with such logic.

Input vector is 7 bit wide. To sum up 7 bits we need 3 bits of binary encoded output.We’ve full adders available. A single full adder can add 3 input bits and generate 2 bitsof binary encoded output.E.g. a full adder can add 3 bit wide input vector ‘111’ and generate ‘11’ output.We can pick two full adders and add up 6 bits of the input vector and will end up withtwo sets of two bit wide binary encoded data.E.g. if input vector is ‘1100111’, we can assume two full adders adding up first 6bits ‘110011’ where first three bits ‘110’ are input to first adder and ‘011’ are inputto second adder. First adder will output ‘10’ (decimal 2) and second adder will alsooutput ‘10’ (decimal 2), and we need to add up two two bit binary vectors. We canagain employ full adders to do this as we still have to account for the 7th input bit ofthe input vector. That can go into the least significant full adder carry-input.

For the above example :

Input vector ‘1100111’

input ‘110’ => full adder => ‘10’ output

input ‘011’ => full adder => ‘10’ output

10

+10

------

100 => output (4)

Now accounting for the seventh input bit ‘1’ as carry into the least significant adder.

1 <= Carry in.

10

+10

-----

101 => Binary encoded decimal 5 which is the input of 1s in inputvector ‘1100111’.

Full adders can be used to add-up 3 input bits at a time. Outputs of first level of fulladders represent the two bit encoded version of the total ‘1’s count, which we need toadd up get the final two digit encoded version of total ‘1’s. Since we need to add up7 bit inputvector, 7th input vector can be used as ‘Carry In’ in the second level of fulladders.

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • asic
    +关注

    关注

    34

    文章

    1154

    浏览量

    119259

原文标题:北美ASIC经典面试试题(2)

文章出处:【微信号:ic_frontend,微信公众号:数字前端ic芯片设计】欢迎添加关注!文章转载请注明出处。

收藏 人收藏

    评论

    相关推荐

    经典Linux面试题总结

    绝对路径用什么符号表示?当前目录、上层目录用什么表示?主目录用什么表示? 切换目录用什么命令?
    的头像 发表于 01-04 11:01 183次阅读

    硬件工程师经典面试题详解

    硬件工程师经典面试题详解
    的头像 发表于 11-20 15:08 749次阅读
    硬件工程师<b class='flag-5'>经典</b><b class='flag-5'>面试题</b>详解

    30道Linux面试题总结

    如果你是一名开发人员、系统管理员,或是仅仅对 Linux 感兴趣,那么这个列表是为你准备的。它包含了类 Unix 系统管理或编程职位面试中涉及 Linux 相关的所有常见问题。
    发表于 10-27 15:29 764次阅读
    30道Linux<b class='flag-5'>面试题</b>总结

    c语言面试题集(完整版)

    电子发烧友网站提供《c语言面试题集(完整版).pdf》资料免费下载
    发表于 10-20 11:20 1次下载
    c语言<b class='flag-5'>面试题</b>集(完整版)

    异步FIFO相关面试问题

    又到了一年一度的招聘季节,有粉丝私信问了一个问题,一个关于以前流传出来的大厂面试的题目,个人觉得算是比较经典的题目,也是工作中经常遇到的一个问题,所以准备写一篇回答下。
    的头像 发表于 10-01 10:11 381次阅读
    异步FIFO相关<b class='flag-5'>面试</b>问题

    硬件经典面试100题分享

    学电人员必备;硬件经典面试100题;面向电子行业的面试基础问题,提前进入职业的大门
    发表于 09-27 06:23

    面试射频工程师需要知道的基础知识

    大家好,这里是射频学堂,今天给大家整理了一下一些知名外企射频类岗位面试题集,这些外企包括:Apple, Qualcomm, MediaTek, Intel, Samsung, Skyworks, Keysight, pSemi, Qorvo, Anokiwave 等等。
    的头像 发表于 08-15 10:15 1072次阅读

    嵌入式开发经典算法之栈逆序

    不借助其他数据结构,如何实现栈的逆序?这是一道非常经典的算法笔试题
    发表于 08-06 17:10 248次阅读

    常见的嵌入式C语言面试题

    数组是最基本的数据结构,关于数组的面试题也屡见不鲜,本文罗列了一些常见的面试题,仅供参考。目前有以下18道题目。
    发表于 07-18 10:46 589次阅读

    嵌入式经典面试题

    嵌入式系统中经常要用到无限循环,如何用C编写死循环
    发表于 06-26 09:53 456次阅读

    iOS多线程面试题解析

    这是某大厂的面试原题,我当时第一问回答对了,然后第二问就凉凉了。
    发表于 06-15 10:28 303次阅读

    什么是ASICASIC中的“特定应用”是什么意思?

    没有关于 ASIC 确切含义的官方声明,而且许多电子专业人士可能并不总是就 ASIC 到底是什么或特定组件是否应归类为 ASIC 达成一致。
    发表于 06-15 09:41 395次阅读
    什么是<b class='flag-5'>ASIC</b>?<b class='flag-5'>ASIC</b>中的“特定应用”是什么意思?

    【别找了全在这】硬件工程师经典试题集锦

    【别找了全在这】硬件工程师经典试题集锦
    发表于 06-09 22:45

    经典面试题】请使用C语言编程实现对IPV4地址的合法性判断

    经典面试题】请使用C语言编程实现对IPV4地址的合法性判断
    的头像 发表于 05-16 15:23 1130次阅读

    分享10道有趣的嵌入式C语言面试题及答案

    10个C语言面试题,涉及指针、进程、运算、结构体、函数、内存,看看你能做出几个!
    的头像 发表于 05-09 10:54 1697次阅读