HDLBits - Vectorgates

2024. 12. 15. 20:10·HDLBits/Verilog

Build a circuit that has two 3-bit inputs that computes
the bitwise-OR of the two vectors,
the logical-OR of the two vectors,
the inverse (NOT) of both vectors.
Place the inverse of b in the upper half of out_not (i.e., bits [5:3]), and the inverse of a in the lower half.

적힌대로 2개의 3-bit입력을 output으로 만드는 문제

Bitwise와 Logical Operators의 차이점은
단순 비트 연산과, 논리 연산 이라는 것에 차이가 있다.

https://hdlbits.01xz.net/wiki/Vectorgates

module top_module( 
    input [2:0] a,
    input [2:0] b,
    output [2:0] out_or_bitwise,
    output out_or_logical,
    output [5:0] out_not
);
    assign out_or_bitwise = a | b;
    assign out_or_logical = a || b;
    assign out_not = {~b, ~a};

endmodule
저작자표시 비영리 변경금지 (새창열림)
'HDLBits/Verilog' 카테고리의 다른 글
  • HDLBits - Vectorr
  • HDLBits - Gates4
  • HDLBits-Vector2
  • HDLBits - Vector1
Zi_Yoon
Zi_Yoon
머리 속에 정리하는 곳 <전자공학>
  • Zi_Yoon
    ZY_repo
    Zi_Yoon
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • HDLBits (25)
        • Verilog (19)
        • Circuits (4)
        • Verification (0)
      • IDEC 교육 (1)
        • Embedded C (13)
        • Verilog HDL (8)
      • Hardware (8)
        • RISC-V Project (1)
        • Computer Architecture (0)
        • AMBA (2)
        • FPGA (0)
        • 논문 읽기 (1)
        • ETC. (4)
      • 42서울 (13)
        • 리눅스 (12)
        • 네트워크 (1)
      • 생각 (1)
      • 취업 (1)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    IDEC
    비대칭 키
    Keil
    axi
    verilator
    centos
    charater
    verilog
    보안 쉘
    c
    RISC-V
    APT
    bit-wise and
    fpga
    QUARTUS
    vm
    fucntion
    embedded
    AppArmor
    hdlbits
    debian
    research rabbit
    세션 키
    AXI4
    signal trap
    ssh
    AMBA
    pointer
    ARM
    lsblk
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
Zi_Yoon
HDLBits - Vectorgates
상단으로

티스토리툴바